| 89 | } |
| 90 | |
| 91 | void IteratorsDemo::demoCircleIterator() |
| 92 | { |
| 93 | ROS_INFO("Running circle iterator demo."); |
| 94 | map_.clearAll(); |
| 95 | publish(); |
| 96 | |
| 97 | Position center(0.0, -0.15); |
| 98 | double radius = 0.4; |
| 99 | |
| 100 | for (grid_map::CircleIterator iterator(map_, center, radius); |
| 101 | !iterator.isPastEnd(); ++iterator) { |
| 102 | map_.at("type", *iterator) = 1.0; |
| 103 | publish(); |
| 104 | ros::Duration duration(0.02); |
| 105 | duration.sleep(); |
| 106 | } |
| 107 | |
| 108 | ros::Duration duration(1.0); |
| 109 | duration.sleep(); |
| 110 | } |
| 111 | |
| 112 | void IteratorsDemo::demoEllipseIterator() |
| 113 | { |