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

Stopping and waiting for an obstacle to get out of the way

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

Zoid gravatar image

updated 2019-12-25 07:39:59 -0600

Orhan 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

Comments

1

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 image PapaG  ( 2019-08-22 18:34:48 -0600 )edit

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?

Suhas gravatar image Suhas  ( 2022-10-22 06:04:11 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
3

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

Comments

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 image Zoid  ( 2019-08-22 04:33:31 -0600 )edit
1

answered 2019-12-25 07:38:05 -0600

Orhan gravatar image

updated 2019-12-25 07:47:52 -0600

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.

edit flag offensive delete link more

Question Tools

4 followers

Stats

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

Seen: 1,635 times

Last updated: Dec 25 '19