How to determine the world coordinate of a cell to update its cost in a costmap?

asked 2022-03-17 17:04:49 -0500

razanleo gravatar image

I'm trying to follow the tutorial example for Simple Layer here: http://wiki.ros.org/costmap_2d/Tutori...

I'm trying to set the cell whose cost will be update 2 meters in front of the robot for example, instead of 1 meter as shown in the tutorial.

However, nothing seems to change the location of the updated cell. I've tried changing the value for mark_x_ & mark_y_, I changed mx & my, I've even commented out the entire code section in updateCost but that doesn't seem to have any effect either as the modified cell is still visible, which is exactly 1 meter in the x direction.

How do I determine which cells I wanna modify and to input the correct coordinates of the cells?

It might be worth noting that I'm running the costmap node independent of the navigation stack.

edit retag flag offensive close merge delete