Unit 5 requires a “costmap” visualization tool in order to view the costmap from the /global_costmap/costmap topic. However, the plugin is not included and I am not sure how to include this plugin. ‘sudo apt install’ does not help.
Hi @RRIC ,
You can add Global and Local Costmaps to RViz display elements by doing one of the blow steps:
- You can select the
Map
underBy display type
tab in add display elements window in RViz. If you choose this method, you will need to specify the topic name after adding this element in the dropdown settings for this display element.
~~~~~ OR ~~~~~ - You can click on the
By topic
tab in the RViz Add display elements window and choose theMap
element with the topic nameglobal_costmap
orlocal_costmap
.
Also, this is not a specific (standalone) plugin, it is a display type that is already packaged with the Navigation packages and is available by default in RViz (if Navigation packages are installed in the system).
Regards,
Girish
hi @girishkumar.kannan, thank you for you response. unfortunately, i have already tried this method, but the specific “costmap” tool does no appear as an option. Forcing it through as a Display Name or hard coding it doesn’t work either.
Also, the map tool doesn’t work for me in displaying the costmap from the /global_costmap/costmap topic. Thanks.
Hi @RRIC ,
I think you have misunderstood something that I am unable to understand what.
There is no such option called “Costmap” in RViz list of display elements.
You can display the global and local costmaps only with the Map
display element.
If your navigation stack is running and if you can find the costmap topics when you do ros2 topic list
, that means your costmap topic exists and can be selected in RViz.
That is why I told you to check the By topic
tab in the RViz Add window. If you cannot find the costmap topic advertised, then you cannot display the costmaps whichever way you force it or hard-coding it.
I suggest you go through the chapter on displaying Costmaps in Rviz, so you can know how it is done.
Regards,
Girish
Hi @girishkumar.kannan, I spent some time trying things out, but the costmap still does no show. Attached is a screenshot of my current rviz configuration, with the “Map” display tool reading the data from the /global_costmap/costmap topic, but no data is shown. Not sure if there is anything I did wrong. My code being run is the same path_planner package as in unit 4, with the additional segment of code that was required to be added into the path_planner.yaml file. Thanks
the ros2 topic list result:
/bond
/bt_navigator/transition_event
/clicked_point
/clock
/cmd_vel
/controller_server/transition_event
/cost_cloud
/diagnostics
/evaluation
/global_costmap/costmap
/global_costmap/costmap_raw
/global_costmap/costmap_updates
/global_costmap/footprint
/global_costmap/global_costmap/transition_event
/global_costmap/published_footprint
/goal_pose
/imu
/initialpose
/joint_states
/local_costmap/costmap
/local_costmap/costmap_raw
/local_costmap/costmap_updates
/local_costmap/footprint
/local_costmap/local_costmap/transition_event
/local_costmap/published_footprint
/local_plan
/map
/map_server/transition_event
/marker
/odom
/parameter_events
/particle_cloud
/performance_metrics
/plan
/planner_server/transition_event
/received_global_plan
/recoveries_server/transition_event
/robot_description
/rosout
/scan
/speed_limit
/tf
/tf_static
/transformed_global_plan
Hi @RRIC ,
Now that you have explained your problem clearly with screenshot, I can give you some suggestions to fix it.
- Check if you are publishing the saved map on the
/map
topic. Yourmap_server
node should take care of this. - Start the RViz program before you start the
map_server
node, that is, before the saved map is advertised into themap
topic. - Check your
Map
topic QoS settings.
If you start RViz after advertising the saved map, most of the times RViz cannot display the map. This could also be a reason why your costmaps are not working, since the base map is not available.
Let me know if the above suggestions fixed your problem.
Regards,
Girish
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.