0
$\begingroup$

Rosanswers logo

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.


Originally posted by Zoid on ROS Answers with karma: 21 on 2019-08-22

Post score: 0


Original comments

Comment by PapaG on 2019-08-22:
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?

Comment by Suhas on 2022-10-22:
Hey @Zoid, did you ever find on how to stop the robot until the obstacle is cleared and then complete the navigation? Or did have to write your own global planner or something?

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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 ;-)


Originally posted by croesmann with karma: 2531 on 2019-08-22

This answer was NOT ACCEPTED on the original site

Post score: 3


Original comments

Comment by Zoid on 2019-08-22:
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!

$\endgroup$
0
$\begingroup$

Rosanswers logo

Doing it via the global planner (actually the move_base goal) looks more easy to me.

Let's say we have a target and a global plan to get there. The local planner is trying to follow that path and generates motions if the global path is ok. Then suddenly, an obstacle appears and the robot's footprint cannot move on the previously created global path. Now, the global planners usually (AFAIK; commonly) create another path to follow. This is called self driving approach.

At this point which you seen an obstacle on the path, instead of following a new global plan(you can understand from its topic when a new one arrives), you can just cancel the navigation goal. After the costmap is clear (the obstacle moved away). Send the target goal back again and it will generate a good global path like the part which was remaining previously.


Originally posted by Orhan with karma: 856 on 2019-12-25

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.