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

Modifying/creating a new layer in a costmap

asked 2022-12-08 07:29:58 -0500

Pran-Seven gravatar image

updated 2022-12-08 16:12:17 -0500

ljaniec gravatar image

Hey! Currently I am trying to implement/modify layered costmaps. So we have a cost map generated by movebase from the /map topic that we are providing. Now say there is some change in the environment and I want to mark some regions as no-go regions.

These no-go regions will be reflected in a new layer of the costmap (that will be created by a node). The coordinates of these regions should ideally be subscribed to the ROS node, and anytime a new set of coordinates are received on this node, the layer that we created previously should be updated. I have tried going through the docs and tutorials on how to create a new layer, but I can't seem to get it to work with my use case.

Would love some pointers on how to implement this? Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-12-16 07:34:12 -0500

Mike Scheutzow gravatar image

updated 2022-12-16 07:38:19 -0500

You will have an easier time if you work with the move_base costmap architecture. That model is that move_base loads costmap2d, which in turn loads "layer plugins". Each layer-plugin subscribes to a topic and updates an internal grid. This is all done by move_base, not by your code. You simply have to publish msgs to a topic in the format the layer plugin wants e.g. LaserScan.

You could create a custom layer plugin, but many of the common use cases already exist.

edit flag offensive delete link more

Comments

Oh that does sound good. But these regions are not being published by a sensor, so I just manually run a subscriber for it to look for? Anyways, thanks a lot, I will check it out and get back.

Pran-Seven gravatar image Pran-Seven  ( 2022-12-16 07:36:56 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-12-08 07:29:58 -0500

Seen: 131 times

Last updated: Dec 16 '22