open-rmf / free_fleet

A free fleet management system.
Apache License 2.0
156 stars 65 forks source link

Fix/clearer movebase errors #93

Closed aaronchongth closed 2 years ago

aaronchongth commented 3 years ago

Bug fix

Fixes https://github.com/open-rmf/free_fleet/issues/92.

Fix applied

Test

ros2 run ff_examples_ros2 send_path_request.py -f turtlebot3 -r tb3_0 -i UNIQUE_TASK_ID -p '[{"x": 1.725, "y": -0.39, "yaw": 0.0, "level_name": "B1"}, {"x": 1.737, "y": 0.951, "yaw": 1.57, "level_name": "B1"}, {"x": -0.616, "y": 1.852, "yaw": 3.14, "level_name": "B1"}, {"x": -0.626, "y": -1.972, "yaw": 4.71, "level_name": "B1"}]'

image

The printouts should look something like this, when it aborts and tries again,

[ WARN] [1631164475.035547767, 1949.243000000]: Rotate recovery behavior started.
[ERROR] [1631164475.035651688, 1949.243000000]: Rotate recovery can't rotate in place because there is a potential collision. Cost: -1.00
[ INFO] [1631164475.136051509, 1949.343000000]: Got new plan
[ WARN] [1631164475.140834967, 1949.348000000]: DWA planner failed to produce path.
[ERROR] [1631164475.236090154, 1949.443000000]: Aborting because a valid control could not be found. Even after executing all recovery behaviors
[ INFO] [1631164475.335374478, 1949.542000000]: robot's navigation stack has aborted the current goal 2 times, client will trying again...
[ INFO] [1631164475.434817655, 1949.642000000]: sending next goal.
[ INFO] [1631164475.535611672, 1949.743000000]: Got new plan
[ WARN] [1631164475.539325824, 1949.746000000]: DWA planner failed to produce path.

The printouts should look something like this after it retries and fails for 5 times in a row,

[ WARN] [1631164828.697811637, 194.939000000]: DWA planner failed to produce path.
[ WARN] [1631164828.794001591, 195.036000000]: Rotate recovery behavior started.
[ERROR] [1631164828.794098687, 195.036000000]: Rotate recovery can't rotate in place because there is a potential collision. Cost: -1.00
[ INFO] [1631164828.893574894, 195.135000000]: Got new plan
[ WARN] [1631164828.897170407, 195.139000000]: DWA planner failed to produce path.
[ERROR] [1631164828.993381070, 195.235000000]: Aborting because a valid control could not be found. Even after executing all recovery behaviors
[ INFO] [1631164828.993924162, 195.235000000]: robot's navigation stack has aborted the current goal 5 times, please check that there is nothing in the way of the robot, client will abort the current path request, and await further requests.

A new path request can be sent over with a new unique ID, and it will start performing the new request.