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

Stopping/Moving a Robot During Navigation

asked 2014-10-01 18:32:21 -0600

ROSCMBOT gravatar image

updated 2014-10-01 20:36:45 -0600

Hello,

I'm using ROS Navigation Stack on my robot. How can I get the robot to stop during navigation for example because of safety issues and after the safety issue was resolved the robot moves again towards the goal.

So basically I don't want to cancel the goal as mentioned in this thread

Thanks

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
9

answered 2014-10-01 21:57:46 -0600

The current ROS Navigation Stack does not offer a "pause navigation" method. Your best shot would be to implement a node that keeps track of the current goal and when a safety issue occurs, use the actionlib API to cancel the current goal (and therefore stop the robot) and when the safety issue is solved, send the goal again(so the robot moves again).

Hope this helps

edit flag offensive delete link more

Comments

I believe this is correct, but if it seems useful, you should open an issue in the nav repo.

David Lu gravatar image David Lu  ( 2014-10-02 12:00:33 -0600 )edit

Thanks for your input @David Lu, I have opened an issue here: https://github.com/ros-planning/navig... let's discuss about it

Martin Peris gravatar image Martin Peris  ( 2014-10-03 01:21:40 -0600 )edit
2

answered 2014-10-02 02:45:14 -0600

rastaxe gravatar image

I used the actionlib to cancel the goal, but I found this method very unreactive. At the moment, if I have to stop my robot, I use its current position as new goal and this is more reactive.

edit flag offensive delete link more

Comments

how did you do it can you share any file

james P M gravatar image james P M  ( 2020-08-25 07:14:24 -0600 )edit
0

answered 2014-10-03 01:26:25 -0600

fergs gravatar image

This is done on the PR2, turtlebot and several other robots by way of a mux on the cmd_vel output. The mux is used to switch between the PS3 joystick cmd_vel and the navigation cmd_vel output, so that as soon as you press the deadman on the PS3 joystick, the cmd_vel topic is switched away from navigation and the robot stops moving and can be teleop-ed. You could do the same with any node that basically inserts itself between the navigation topic output and the base controller topic input.

Note that this doesn't actually stop navigation from trying to replan, etc, it just stops the robot from moving. Navigation might later decide that the goal has timed out if you leave it switched away for a while.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2014-10-01 18:32:21 -0600

Seen: 3,638 times

Last updated: Oct 03 '14