Ask Your Question

teb_local_planner and move_base

asked 2019-08-22 02:34:21 -0600

Zoid gravatar image

Hello all,

I am currently using move_base with teb_local_planner for a swerve drive mobile robot setup. Overall, this sutup seams to be working ok and it avoids obstacles when introduced. However, I am wondering if there is a way to force the local planner following just the global plan trajectory and stop the robot if an obstacle is introduced on its way. In other words, I want to stop the robot from trying to dynamically avoid any obstacles. Also, I want the robot to resume its trajectory when the obstacle in its path is removed. Do you know if this behavior is possible to be achieved using move_base and teb_local_planner and what parameters need to be changed to do that?

Thank you in advance.

edit retag flag offensive close merge delete


The idea of the teb_local_planner is to dynamically avoid obstacles. You are asking it to do essentially the opposite of what it is meant to do, perhaps just write a node that detects obstacles (from cost map) intersecting your path (bounding box) and send 0 command if so?

PapaG gravatar imagePapaG ( 2019-08-22 18:34:48 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-08-22 02:51:11 -0600

croesmann gravatar image

Your desired behavior is not yet available out-of-the-box. However, you can configure the local planner to follow the global plan by activating and configuring via-points.

Then, you could add a separate small node between the twist message from the local planner and the robot, which slows down the robot in case of any potential collision (e.g. by considering the maximum deceleration). The additional issue here is, that you would need to also subscribe to the cost map or you need to process your sensor data manually to get the obstacle positions. In case the local planner still tries to avoid the obstacles, you might reduce the parameter weight_obstacle of the local planner to zero.

Another possibility is to add such a stopping behavior to the local planner, which should be straight forward (before actually sending the velocity commands). I would be happy to accept any pull request ;-)

edit flag offensive delete link more


Hi and thank you for the reply!

Ok I see your points and I will try them. However, I was wondering what will happened if, after initializing a goal nav pose in e.g. rviz and the robot starts moving, an obstacle appears exactly on the goal pose essentially blocking the final execution of the global plan. What will happened then? Theoretically it should stop moving but I don't see this happening on my real robot.

Thank you again!

Zoid gravatar imageZoid ( 2019-08-22 04:33:31 -0600 )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



Asked: 2019-08-22 02:34:21 -0600

Seen: 51 times

Last updated: Aug 22