ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

robot reverses into final pose

asked 2020-03-11 00:15:49 -0500

Dave Everett gravatar image

I have a differential drive base, running TEB as the local planner under Kinetic. When I navigate to a destination, if the requested pose is not the same as the pose the robot took to get there, it always turns before the final position and reverses into the destination. This seems odd. I would have expected the robot to navigate to the destination, then turn on the spot to get the requested pose. I have checked to ensure I do not have any car-like settings, and I have set the min_turning_radius to 0.0. I am using a footprint model for the robot rather than the radius parameter. I changed it back to Point and radius but get the same results.

Does anyone have some advice on this, or will I need to delve into the C++ files and modify them?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-03-11 03:00:15 -0500

croesmann gravatar image

updated 2020-03-11 03:02:13 -0500

There are multiple reasons for this behavior:

  • The planner generates minmum-time trajectories. And based on your velocity and acceleration constraints, it's often faster to perform these motion reversals rather than turning in place. For example, if you allow high acceleration limits for fast reversals of motion, turning during forward/reverse motion may be faster than turning in place at the maximum angular velocity. You can penalize backwards motions in general by increasing weight_kinematics_forward_drive.
  • In case the goal is behind the robot and it is outside the local costmap resp. requires a trajectory longer than max_global_plan_lookahead_dist meters, this turning behavior often occurs as the global planner does not include the orientation (2D planning rather than 2.5D planning). So the teb_local_planner interpolates the intermediate goal orientation which might result in additional rotations. However, this is subject to the global planner as described here.
edit flag offensive delete link more


Thanks. I had weight_kinematics_forward_drive set at 70 to avoid as much reverse drive as possible. The goals in these cases was in front of the robot, its just the final pose that was the problem. For example, if I set a destination 3 m in x, but pose pointing back towards the starting position, the robot always rotates before the destination and reverses into the final spot. This is not a rotate in place, but a turn as if it were in a car-like mode.

Dave Everett gravatar image Dave Everett  ( 2020-03-11 06:27:42 -0500 )edit

But this behavior is reasonable as I wrote ;-). A weight of 70 for this parameter does not seem to be large. Is your issue resolved now?

croesmann gravatar image croesmann  ( 2020-03-11 06:44:35 -0500 )edit

I had imagined that 70 was high as the info page talked about 1.0 being a small weight. I set it to 950 and it seems a lot better. If the info page just provided a bit more information about the limits this would have been easier. Thanks for your help mate.

Dave Everett gravatar image Dave Everett  ( 2020-03-11 08:43:09 -0500 )edit

You're welcome ;-). I added more information to the wiki. Please mark the answer as correct.

croesmann gravatar image croesmann  ( 2020-03-11 09:12:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-03-11 00:15:49 -0500

Seen: 73 times

Last updated: Mar 11 '20