| 68 | } |
| 69 | |
| 70 | void IteratorsDemo::demoSubmapIterator() |
| 71 | { |
| 72 | ROS_INFO("Running submap iterator demo."); |
| 73 | map_.clearAll(); |
| 74 | publish(); |
| 75 | |
| 76 | Index submapStartIndex(3, 5); |
| 77 | Index submapBufferSize(12, 7); |
| 78 | |
| 79 | for (grid_map::SubmapIterator iterator(map_, submapStartIndex, submapBufferSize); |
| 80 | !iterator.isPastEnd(); ++iterator) { |
| 81 | map_.at("type", *iterator) = 1.0; |
| 82 | publish(); |
| 83 | ros::Duration duration(0.02); |
| 84 | duration.sleep(); |
| 85 | } |
| 86 | |
| 87 | ros::Duration duration(1.0); |
| 88 | duration.sleep(); |
| 89 | } |
| 90 | |
| 91 | void IteratorsDemo::demoCircleIterator() |
| 92 | { |