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

Plan towards a global plan

asked 2020-11-02 07:11:39 -0600

We would like to plan towards an existing trajectory with minimal distance traveled.


  • A pre-calculated global plan exists which we should stick to as close as possible
  • There is an open-field path possible from the robot towards the global path


  1. The turning radius of the robot should be taken into account
  2. Driving backwards is allowed


  • a. Obstacle avoidance
  • b. Dynamic obstacle avoidance


  • I. Existing trajectory has a direction


Is such a global planner already available?

If not, can we mimic this behavior with an existing global planner?

edit retag flag offensive close merge delete


To add to chfritz' answer below, TEB works quite well as local planner and you can optimize towards shortest time or shortest path. I have seen shortest path works the best for our omni-directional robot see, here it adheres more to the global path. You can see an example of global_plan_viapoint_sep: 0.5illustrated by the small blue squares along the local path here It is a bit more computational expensive, but works out quite well to attract the robot closer to the global path.

For optimization of TEB there are loads of parameters. You should try and find some that work, and then tune the weights for TEB afterwards. Do all the tuning through RQT dynamic reconfigure, makes it much easier.

tropic gravatar image tropic  ( 2020-11-14 05:43:31 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2020-11-03 10:10:33 -0600

I don't think you are looking for a global planner, but rather a local planner that adheres to your already existing global plan. I would highly recommend the TEB local planner to you. It has parameters to allow what you need regarding strictness of adherence, turning radius, taking global-plan direction into account, and allowing backwards motion. To increase adherence I would recommend using a small via-point seperation, e.g., global_plan_viapoint_sep: 0.5.

To enforce a shortest path, you can use this optimization parameter that doesn't yet seem to be documented in their wiki page: weight_shortest_path: 3 You'll need to try different values here and maybe reduce the values for some of the other weight, especially weight_max_vel_x.

edit flag offensive delete link more


I actually was looking for a global planner for two reasons:

  1. An action interface to call. This would succeed when aligned with the main path again.
  2. We have our own local planner with dynamic limitations on the velocity that can be reached. It would be practical to re-use that here.

But thank you for pointing me in the direction of local planners. It didn't cross my mind due to the (unlisted sorry) criteria above. But they are often designed with exactly this in mind. I'll look into this to see if:

  • a) a local planner (TEB?) can limit the velocities in a similar manner
  • b) a local planner can publish the path it came up with. And re-use that as global plan for our local planner
  • c) we can re-use the libraries used here to wrap in a global planner
Timple86 gravatar image Timple86  ( 2020-11-23 01:57:21 -0600 )edit

answered 2021-05-04 01:29:39 -0600

Since we really needed our own local planner, I ended up with a custom solution.

The steering_functions package provides functions to create a point-to-point path. Now I just sample our global plan with 1m intervals. For every point we calculate the goto-path and in the end the shortest goto-path is the path we will follow.

This path can simply be fed to move_base(_flex) as any other path, from there the global path can be resumed.

edit flag offensive delete link more

Question Tools



Asked: 2020-11-02 07:11:39 -0600

Seen: 557 times

Last updated: May 04 '21