Modifying/creating a new layer in a costmap
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!
Asked by Pran-Seven on 2022-12-08 08:29:58 UTC
Answers
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.
Asked by Mike Scheutzow on 2022-12-16 08:34:12 UTC
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.
Asked by Pran-Seven on 2022-12-16 08:36:56 UTC
Comments