Robotics StackExchange | Archived questions

Under what circumstances will actionlib not mark a MoveBaseGoal as successful?

I'm using a SimpleActionClient to issue MoveBaseGoals to an instance of /move_base in a flat outdoor environment. If I have the "xy_tolerance" parameter for baselocalplanner set to ~0.35m or larger then everything works well without any problems. However, If I reduce the tolerance to 0.25m in an effort to improve navigational accuracy, actionlib stops recognising that it has successfully reached the goal - even if it is repeatably within this tolerance in both the X,Y and Z axis (not that there is a vertical tolerance from what I understand). See below for an example bag file

In this case, the state of the goal remains stuck on '1' (labelled as ACTIVE) and will remain that way indefinitely until I manually cancel it.

So my question is: since all I have changed to cause this behaviour is "xy_tolerance", are there any hidden conditions that must be fulfilled for actionlib to move the state from 1 (ACTIVE) to 3 (SUCCEEDED) other than getting the robot within this distance of the goal point? Or am I likely just hitting the limit on how accurate ROS can be in an outdoor environment? The GPS I'm using is accurate to 20mm, as is the global fused data (verified experimentally).

I'm aware that there are a few other questions that address this issue. However, for the most part they seem to experience this problem regardless, whereas I only see it if I lower "xy_tolerance". So I believe the causes may be different.

Any help or advice is appreciated.

UPDATE 1: I must have been using a slightly older version of move_base and actionlib because I recently updated all my ROS packages and now the goal detection is significantly worse, to the point where it almost never correctly detects if it's reached the goal point, even if it's well within tolerance.

UPDATE 2: As suggested by @David Lu I increased the yaw to Pi (3.14) and conducted a test run. While the larger yaw tolerance significantly increased the rate of goals being successfully recognised, there were still several instances where the robot was within both the X,Y and yaw tolerances and yet it still didn't correctly recognise reaching the goal. I'll upload the bag file shortly.

I've looked through the source code for the internal goal check (goal_functions.cpp) and I noticed that the function checks the last pose in the global path (which is just an array of poses) against the current global position, whereas I'm using the original goal sent to the robot vs the current global position. So is it possible that the global path could have been re-calculated and ended up with a goal pose in a different place to the original?

UPDATE 3: As per @David Lu's suggestion (thanks for the help again!) I checked the end of the global path and the current goal:

Both almost perfectly match the goal I originally send to the SimpleActionServer (maybe out by 1mm) and if I've read the source code right, actionlib checks the global path to see if it's reached the goal (rather than say checking the local path). So it's definitely reaching the goal, even by actionlib's own standards.

UPDATE 4: I don't think I've solved the problem, but I've learned a bit more about what's going on with my specific system. As mentioned, I'm using a SimpleActionServer/Client to issue move goals to an instance of the /movebase node. All my goals are issued in the global /map frame (which fuses GPS data so It's accurate over long distances). By default the /movebase node plots a global path in the /map frame, but it plots the local path and issues move commands in the /odom frame, which is inaccurate and can drift quite badly over long distances.

The kicker is, even if you issue a move goal in the /map frame, that will not necessarily be the goal the robot attempts to reach. The /move_base node deals with two goal related topics:

So if the robot is within the tolerance of the goal specified in /movebase/currentgoal it will mark the goal as succeeded, regardless of the distance to the goal you actually specified in /move_base/goal. I've only roughly checked all this so I could be wrong or it could be something specific to my system. But hopefully it helps.

The navigation parameters can be changed, so I've changed the globalframeid for the baselocalplanner from /odom to /map. This forces the local planner to operate in the /map frame, so the goal should be the same in both topics. After making this change I've noticed a big improvement, its not perfect but most of the time it correctly marks the goal as succeeded if it got within tolerance. I still find that the local path drifts quite a bit, so my robot no longer travels in straight lines but that problem may be unrelated.

System Information

Asked by M@t on 2016-08-02 00:07:00 UTC

Comments

@David Lu?

Asked by gvdhoorn on 2016-08-05 10:39:49 UTC

I watched the bag and have no solid answers. Initial thought: what happens if you increase the yaw_tolerance to Pi? https://github.com/ros-planning/navigation/blob/jade-devel/base_local_planner/src/trajectory_planner_ros.cpp#L422

Asked by David Lu on 2016-08-06 13:50:21 UTC

I'll give it a shot and post the results as soon as I can. Thing is though, the robot never gets to the "rotateToGoal" part. So I think the error is in detecting that it's reached the correct X,Y,Z position.

Asked by M@t on 2016-08-07 17:16:29 UTC

Is there an appreciable difference between the end of the global path and the pose you sent?

Asked by David Lu on 2016-08-21 17:36:44 UTC

That's exactly what I'm wondering, because the path is essentially an array of poses, and the path is periodically re-plotted so it may well change. I've gotten sidetracked with a different problem, but I fully intend to compare the original goal to the end of the path/current position ASAP.

Asked by M@t on 2016-08-21 17:56:12 UTC

Nope, almost no difference whatsoever. Doesn't matter if it's the end of the global pose or the pose in the /move_base/current_goal topic. They all match the goal I send.

Asked by M@t on 2016-08-21 23:50:46 UTC

Hello @M@t , did you find a solution to your problem ?

Asked by Kiwa21 on 2016-09-19 12:18:28 UTC

No I haven't sorry, I've been distracted by other aspects of my project/health issues so I simply haven't had the time to look into it further. I'll keep chipping away at it as and when I can though.

Asked by M@t on 2016-09-20 15:54:18 UTC

@M@t did u find a solution?

Asked by dottant on 2016-10-25 09:43:37 UTC

I've been bogged down with other work so I simply haven't had the time to properly work on this. I have found some improvements so I've updated the question. TL;DR: try changing global_frame_id from /odom to /map in the base_local_planner parameters. Let me know if it helps you.

Asked by M@t on 2016-10-26 15:23:54 UTC

Answers