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

Problems subscribing to the local_costmap of move_base

$
0
0
I am trying to subscribe to the local costmap produced in move_base in order to use it, in a separate node, for navigation. This is how I am currently approaching it in my code: typedef actionlib::SimpleActionClient MoveBaseClient; typedef nav_msgs::OccupancyGrid occupancyGrid; occupancyGrid global_map; void costmapcallback(occupancyGrid costmap){ global_map = costmap; } ros::Subscriber subOGrid = banana_nav.subscribe("move_base/local_costmap/costmap_updates",1000,costmapcallback); field_length = global_map.info.height; field_width = global_map.info.width; There seems to be a connection between my node and move_base/local_costmap_updates but whenever global_map.info.height/width is called it always returns zeros for both which leads me to believe that the local costmap is never being sent to or saved by the global_map occupancy grid. Why would there be a connection between the nodes, seen via RQT, yet nothing is actually stored to the global_map occupancy grid? This is only a small portion of my code but if more is needed I will upload more.

Viewing all articles
Browse latest Browse all 667

Trending Articles



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