MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / demoCircleIterator

Method demoCircleIterator

grid_map_demos/src/IteratorsDemo.cpp:91–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void 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
112void IteratorsDemo::demoEllipseIterator()
113{

Callers

nothing calls this directly

Calls 3

clearAllMethod · 0.80
atMethod · 0.80
isPastEndMethod · 0.45

Tested by

no test coverage detected