Stop clearing recovery behaviour on some costmap layers
Hi,
I am using movebase with a gazebo simulation of a Turtlebot3 with Kinetic. I have a custom costmap layer which assigns a cost (arbitrary but let us say 50) based on the footprint of a robot (to avoid the robot going over ground it has already covered). The custom layer uses a costmap2d::Layer class.
The global costmap uses: a "static layer" - created on-the-fly with gmapping, "obstacle layer" (using a 2D lidar), and an "inflation layer". The custom layer comes after these three in the plugins list, and all works as expected. (The local layer only uses an "obstacle layer" and "inflation layer").
Each are defined earlier in the param yaml file.
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
- {name: custom_layer, type: "custom_layer::CustomLayer"}
The problem:
When the costmap resizes (as the robot travels out of current bounds), the clearing recovery removes all non-lethal costs when it reverts back to the static layer map (default behaviour). This completely removes any costs associated with the custom layer (unwanted behaviour!).
What I have tried - and did not work:
1) For both the global costmap and the movebase params trying to turn off recovery behaviours using `recoverybehavior_enabled: false`
2) Setting above back to true, and defining the conservative and aggressive clear radius to large values in the global cost params
recovery_behaviors: [
{name: conservative_clear, type: clear_costmap_recovery/ClearCostmapRecovery},
{name: aggressive_clear, type: clear_costmap_recovery/ClearCostmapRecovery}
]
conservative_clear:
reset_distance: 10.00
aggressive_clear:
reset_distance: 10.00
3) Trying to specify which layers are effected by clearing behaviour
conservative_clear:
reset_distance: 10.00
layer_names: ["obstacle_layer"]
aggressive_clear:
reset_distance: 10.00
layer_names: ["obstacle_layer"]
My question: Is there any way to stop the clearing behaviour from affecting a particular layer? I would still like to keep the clearing behaviours on in general (e.g. obstacle layer).
If this is not possible - Is there a method to store non-lethal costs on a global map in a permanent manner? For example, would building a map separately and passing it to move_base somehow work?
Best wishes,
Andy West
Asked by Andy West on 2018-11-20 07:12:18 UTC
Comments
Does option 3 not work? https://github.com/ros-planning/navigation/blob/melodic-devel/clear_costmap_recovery/src/clear_costmap_recovery.cpp#L63
Asked by David Lu on 2018-11-24 11:46:48 UTC
Hi David, thanks for taking a look. After more investigation, I think it is an issue with the resizeMap function, rather than the clear_recovery_behaviour which is also invoked upon resizing. Is there no way to resizeMap and not delete the costmap information?
Asked by Andy West on 2018-11-27 04:39:11 UTC