Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 667

StaticLayer map-resize erases all obstacles from ObstacleLayer

$
0
0
Hello @David Lu I am using Google Cartographer as SLAM component, and move_base for navigation. In the config of the global costmap, I have setup costmap_2d::StaticLayer to subscribe to the /map topic published by cartographer. There is also an ObstacleLayer and an InflationLayer. My problem is that each time cartographer dynamically adjusts the map size, all obstacles which have been added to the global costmap get erased. Looking at the code of [static_layer.cpp](https://github.com/ros-planning/navigation/blob/53087ca5242fb40f06c84a6bcc74057c3470eff7/costmap_2d/plugins/static_layer.cpp) I can see that StaticLayer::incomingMap() is executed when a map with new dimensions is received. In this function, there is a section that [initializes the costmap with static data](https://github.com/ros-planning/navigation/blob/53087ca5242fb40f06c84a6bcc74057c3470eff7/costmap_2d/plugins/static_layer.cpp#L197-L206). How can I prevent the StaticLayer from erasing previously discovered obstacles from the ObstacleLayer to get erased from the master costmap (i.e. global costmap)? Thanks

Viewing all articles
Browse latest Browse all 667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>