Save Marker in RVIZ with map server
Hi all, I'm a newbie to ROS. To briefly describe the usecase, my robot identifies objects(humans) and need to mark their location in the map. Currently what I do is I publish this as a Marker to RVIZ which shows the location.
But when I save the map using the map_server, that marker is not visible.
Any help on this is much appreciated.
Thanks!
Asked by sachith on 2018-11-27 05:22:04 UTC
Answers
The problem you're having is because the Marker messages you are visualising in RVIZ are not related to the map within the map_server. You will need to translate the positions of the markers you currently have into map space and add them directly into the map as obstacles in order for them to be saved or for them to affect the path planning within the map.
RVIZ allows you to visualise many of the standard message types that ROS supports, what you see on it's GUI is not just a map but all the topics you've currently set it up to view. The map_server is just saving the map part, it has no visibility of any other messages being passed around ROS at the time, which includes your marker messages.
Hope this helps.
Asked by PeteBlackerThe3rd on 2018-11-27 07:13:25 UTC
Comments
Thanks for the answer. Yes I then looked into the map server code and noticed that it only saves the occupancy grid of the 'map'. I didn't understand what you meant 'map space' and obstacles. You mean adding the markers as obstacles in the real env (or Gazebo) so that the robot mapping detects them
Asked by sachith on 2018-11-27 08:17:38 UTC
Comments