Dynamically adding prohibited zones to costmap
Hello World,
I want to dynamically (at will) add and remove "prohibited" zones to the costmap. The zones should be simple polygons which prevent the local planner from driving through them. They should be controllable by publishing, for example a Polygon, to certain topics.
I looked at the following solutions:
- costmap_prohibition_layer: zones are static
static map layer with
subscribe_to_updates
: updates are not displayedrostopic pub /map_updates map_msgs/OccupancyGridUpdate "header: frame_id: 'map' x: 10 y: 10 width: 10 height: 10 data: [100,100,100,100,100,100,100,100,100,100,...]"
I checked that move_base_flex had subscribed to
/map_updates
, maybealways_send_full_costmap: true
or gmapping pulishing to/map
has something to do with it?
Environment:
- ROS: noetic
uname -a
:Linux husarion 5.4.0-1-generic #0~upboard5-Ubuntu SMP Fri Jan 7 11:53:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
- navigation: mbf_costmap_nav 0.4.0, costmap_2d 1.17.2, gmapping 1.4.2
What can I use to solve this problem?
Thank you for you attention :)
I will try to publish the updates to a seperate static layer called "prohibited_layer", listening on the topics prohibited and prohibited_updates.
Changes should be seen since the layer is above static_layer and not potentially overwritten by gmapping publishing to /map.