ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to combine local costmap from laserscan and update with /costmap_updates

asked 2023-06-12 07:38:22 -0500

ChWa02 gravatar image

updated 2023-06-12 07:38:37 -0500

Hi all,

Ubuntu: 22.04 ROS: Humble

I'm trying to update my generated costmap based on several factors. Currently, I'm getting a costmap based on the robots laser scan. In order to update this map I've tried to use the costmap_updates message where I'm publishing a updated version of the costmap.
Sadly, this does not lead to the wanted behavior as the generated costmap flicks between the one from the laser scan and the one I'm publishing. Is there any way to combine these two sources to one costmap?

I would really like to share some screenshots of the behavior I'm getting, but sadly my karma is not yet high enough.

Best regards!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-06-12 18:32:04 -0500

costmap_updates is an output message of the costmap2D program which is providing updates to just regions that were recently changed instead of sending the full costmap each iteration. It is NOT an input message to change the costmap nor should it be manually set. You should have your updates go through the costmap via plugin layers or other mechanisms to publish out the centralized environmental model.

The fact that you see flickering is because the costmap is overwriting your manually sent changes because the costmap knows nothing about them. Only rviz is using that, nothing else.

edit flag offensive delete link more

Comments

Thank you very much for the hint!

ChWa02 gravatar image ChWa02  ( 2023-06-13 02:20:37 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-06-12 07:38:22 -0500

Seen: 119 times

Last updated: Jun 12 '23