How to get current layered costmap and set costs using it

asked 2016-04-11 10:58:16 -0600

maciejm gravatar image

Hey Everyone,

I'm struggling with getting the master costmap and sending coordinates to it. It's actually producing a lot of struggle for me. The aim is to use two robots and send coordinates from one to the other so that they can avoid each other as obstacles. I get the general gyst and I am able to set static coordinates from inside the GridLayer but that's not the point. The point is to be able to set these automatically. I tried getting the plainest costmap but am coming back with an error. The idea is for odom to publish coordinates and using setCost for GridLayer to updateCosts. Is that possible? Also the map needs to update for all other robots otherwise the current robot will always be in obstacle space so is it possible to obtain other costmaps using costmap topic?

You can see my codebase on The launch file used is Robot2/launch_robot.launch The current package that needs odom optimisation is robot2_tf. The package that contains the grid layer is simple_layers.

Kind regards, Maciej

edit retag flag offensive close merge delete