DWA local planner can't find a trajectory unless rotate recovery runs
I'm trying to explore a room with my differential drive robot in Gazebo, running ROS Noetic on a Ubuntu 20.04 VM. When I set a 2D nav goal in RViz the global planner finds a path, but the local planner (DWA) cannot find a trajectory. After a while the recovery behaviours run (first the clearing of the cost maps which doesn't help, and then the rotate recovery). After the rotate recovery runs (or even during), the DWA planner generally finds a path and drives the robot to the goal.
The debug log returns the following
[ INFO][1:00:19.385 PM NZST][/move_base]: Got new plan
[DEBUG][1:00:19.385 PM NZST][/move_base]: Nearest waypoint to <-3.054630, 1.505509> is <-3.054631, 1.505509>
[DEBUG][1:00:19.385 PM NZST][/move_base]: Received a transformed plan with 88 points.
[DEBUG][1:00:19.387 PM NZST][/move_base]: Evaluated 0 trajectories, found 0 valid
[DEBUG][1:00:19.388 PM NZST][/move_base]: Cost PointCloud published
[DEBUG][1:00:19.388 PM NZST][/move_base]: The dwa local planner failed to find a valid plan, cost functions discarded all candidates. This can mean there is an obstacle too close to the robot.
[ WARN][1:00:19.388 PM NZST][/move_base]: DWA planner failed to produce path.
[ WARN][1:00:19.483 PM NZST][/move_base]: Clearing both costmaps to unstuck robot (3.00m).
[ INFO][1:00:19.683 PM NZST][/move_base]: Got new plan
[DEBUG][1:00:19.683 PM NZST][/move_base]: Nearest waypoint to <-3.054630, 1.505561> is <-3.054630, 1.505544>
[DEBUG][1:00:19.683 PM NZST][/move_base]: Received a transformed plan with 88 points.
[DEBUG][1:00:19.683 PM NZST][/move_base]: Evaluated 0 trajectories, found 0 valid
[DEBUG][1:00:19.683 PM NZST][/move_base]: Cost PointCloud published
[DEBUG][1:00:19.683 PM NZST][/move_base]: The dwa local planner failed to find a valid plan, cost functions discarded all candidates. This can mean there is an obstacle too close to the robot.
[ WARN][1:00:19.683 PM NZST][/move_base]: DWA planner failed to produce path.
[ WARN][1:00:19.783 PM NZST][/move_base]: Rotate recovery behavior started.
[ INFO][1:00:26.883 PM NZST][/move_base]: Got new plan
[ INFO][1:00:26.983 PM NZST][/move_base]: Got new plan
[DEBUG][1:00:26.983 PM NZST][/move_base]: Nearest waypoint to <-3.052998, 1.496237> is <-3.052971, 1.496269>
[DEBUG][1:00:26.983 PM NZST][/move_base]: Received a transformed plan with 88 points.
[DEBUG][1:00:26.994 PM NZST][/move_base]: Evaluated 1008 trajectories, found 1008 valid
[DEBUG][1:00:26.995 PM NZST][/move_base]: Cost PointCloud published
[DEBUG][1:00:26.996 PM NZST][/move_base]: A valid velocity command of (-0.06, 0.00, 0.91) was found for this cycle.
[ INFO][1:00:27.083 PM NZST][/move_base]: Got new plan
[DEBUG][1:00:27.083 PM NZST][/move_base]: Nearest waypoint to ...
Note. I don't have enough rep yet to add pictures. Will upload some once I have enough rep.
I've uploaded a video of the behaviour here: https://www.youtube.com/watch?v=Nt9Xy.... From that video it looks that the DWA planner doesn't "get" the global path until the rotate recovery runs. Not sure why
HI,
I have nearly the same issue as you described above, so I would like to know if you solved it and if you did can you please let me know what was the solution. Thank you in advance.
I haven't figured it out yet. I suspect that somewhere in the DWA planner it tries to work with the global plan but fails or it might not even get a valid path or something. I'd have to start looking at the code for the DWA planner and that hasn't been on my priority list yet. At the moment I'm thinking about switching to ROS2 so if the ROS2 DWA planner has the same issue I will have a look at it in more detail.
Okay, thank you for the fast response. I will do some more experimenting with the parameters and in case I find something and solve it I will let you know.