Closed Max-Ole closed 2 years ago
Can you see the elevation map by just replaying the bagfile, with rosbag play /home/administrator/catkin_ws_Max-OleVW/myRecordedData/elevation_map_geb64_3.bag
?
When I use rosbag play
rviz doesn't show the elevtion map. I thought that was because the bagfile only contains a single message.
I wrote a simple script that receives the map when I use the command you mentioned. It then repeatedly publishes that map on the same ros topic. By doing that the elevation map can be displayed in rviz.
Thank you for testing.
However if I then call rosservice call /elevation_mapping/load_map "file_path: '/home/ubuntu/Desktop/BA_MaxOle_ws/myRecordedData/myRecordedData/elevation_map_geb64_2.bag' (returns success: True) then the map that was being created until then disappears and a new map shows up from the current sensor input. There is no sign of the map I loaded.
Could it be that when replaying the robot is in another position? Based on the (returns success: True)
the loading was successful. Saved maps have a position attached to it, depending on where your robot is at the point of replaying the map could be outside of the range.
You are correct, the loading is successful and it can be seen in the different output of rostopic echo /elevation_mapping/elevation_map
. And the map shows up in rviz.
For anyone having a similar problem, here is what I had to do to find the map:
Thanks for the help!
Thank you for confirming that it worked.
Hello, I have saved an elevation map using the save_map service call. Now would like to load it back into the elevation mapping package using the load_map rosservice call.
I first run the same launch file which I also used to save the map. It brings up a simulation in gazebo and rviz to visualize the elevation map. However if I then call
rosservice call /elevation_mapping/load_map "file_path: '/home/ubuntu/Desktop/BA_MaxOle_ws/myRecordedData/myRecordedData/elevation_map_geb64_2.bag'
(returnssuccess: True
) then the map that was being created until then disappears and a new map shows up from the current sensor input. There is no sign of the map I loaded. I tried to use the service calldisable_updates
because I thought the new input was overriding the loaded map. But with new input disabled the map disappears without replacement.Am I misusing the service call? What I am trying to achieve is to have the same map data to test different elevation_mapping postprocessor pipelines and the conversion to a occupancy grid using grid_map_visualization from the grid_map package.
Also please note that
topic_name
was omitted when saving and loading the map because of the following error in the call:The file was saved using
rosservice call /elevation_mapping/save_map "file_path: '/home/administrator/catkin_ws_Max-OleVW/myRecordedData/elevation_map_geb64_2.bag'"
and then moved from the robot to my PC.Thanks for any advice!