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

Revision history [back]

click to hide/show revision 1
initial version

Hello,

I had to dig a bit into this myself as the issue also appeared for my robot. I will assmue you are using default nav2 setup.

It seems the issue is coming from costmap parameters but rather come from critics selection for dwb_controller. In fact, in the default parameters you have the following critics selected:

critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"]

However if you look at the "default_critics.xml" file in the dwb_critics package you can find the following documentation about critics:

    <class type="dwb_critics::BaseObstacleCritic" base_class_type="dwb_core::TrajectoryCritic">
  <description>Uses costmap 2d to assign negative costs if a circular robot
               would collide at any point of the trajectory.
  </description>
</class>
<class type="dwb_critics::ObstacleFootprintCritic" base_class_type="dwb_core::TrajectoryCritic">
  <description>Uses costmap 2d to assign negative costs if robot footprint is in obstacle
               on any point of the trajectory.
  </description>

So for a rectangular robot you have to use the ObstacleFootprintCritic rather than the BaseObsctacleCritic.

Hello,

I had to dig a bit into this myself as the issue also appeared for my robot. I will assmue assume you are using default nav2 setup.

It seems the issue is not coming from costmap parameters but rather come from critics selection for dwb_controller. In fact, in the default parameters you have the following critics selected:

critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"]

However if you look at the "default_critics.xml" file in the dwb_critics package you can find the following documentation about critics:

    <class type="dwb_critics::BaseObstacleCritic" base_class_type="dwb_core::TrajectoryCritic">
  <description>Uses costmap 2d to assign negative costs if a circular robot
               would collide at any point of the trajectory.
  </description>
</class>
<class type="dwb_critics::ObstacleFootprintCritic" base_class_type="dwb_core::TrajectoryCritic">
  <description>Uses costmap 2d to assign negative costs if robot footprint is in obstacle
               on any point of the trajectory.
  </description>

So for a rectangular robot you have to use the ObstacleFootprintCritic rather than the BaseObsctacleCritic.