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

Method demoLineIterator

grid_map_demos/src/IteratorsDemo.cpp:154–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154void IteratorsDemo::demoLineIterator()
155{
156 ROS_INFO("Running line iterator demo.");
157 map_.clearAll();
158 publish();
159
160 Index start(18, 2);
161 Index end(2, 13);
162
163 for (grid_map::LineIterator iterator(map_, start, end);
164 !iterator.isPastEnd(); ++iterator) {
165 map_.at("type", *iterator) = 1.0;
166 publish();
167 ros::Duration duration(0.02);
168 duration.sleep();
169 }
170
171 ros::Duration duration(1.0);
172 duration.sleep();
173}
174
175void IteratorsDemo::demoPolygonIterator(const bool prepareForOtherDemos)
176{

Callers

nothing calls this directly

Calls 3

clearAllMethod · 0.80
atMethod · 0.80
isPastEndMethod · 0.45

Tested by

no test coverage detected