Ask Your Question
4

How can I cancel a navigation command?

asked 2013-03-11 07:17:03 -0500

Dereck gravatar image

updated 2014-01-28 17:15:37 -0500

ngrennan gravatar image

When I send a navigation request via rviz, how can I cancel the request?

Bonus points for a rostopic pub {blaj} Double bonus multiplier for python implementation

Thanks! :D

edit retag flag offensive close merge delete

Comments

@Dereck im using the simple_navigation_goals and in ti you can cancel goals. Also do you know if it is possible to send a new goal before the old one is acomplished?

ctguell gravatar imagectguell ( 2013-11-04 06:11:02 -0500 )edit

When you submit a new goal, the old one is replaced. (At least when I used it.)

Dereck gravatar imageDereck ( 2013-11-04 06:23:07 -0500 )edit

@Dereck thanks im having a problem when i send the goal ac.sendGoal(goal) if i dont put ac.waitForResult(); the goal is not posted or the robot does not move, when i ac.waitForResult(); it does move. But due to this line im unable to post a new goal until the waitforresults ends. do you have any idea why or any ideas on how to solve it? i would really appreciate it

ctguell gravatar imagectguell ( 2013-11-04 08:11:45 -0500 )edit

unfortunately I do not. Perhaps there is a way to inject a debug message in the action server to make sure that your action request is really making it to the server. Then make sure nothing else is overwriting your request? That's what I would do at least. :?

Dereck gravatar imageDereck ( 2013-11-04 08:18:26 -0500 )edit

@Dereck thanks, one more question do you now to which topic is the goal posted to? thanks

ctguell gravatar imagectguell ( 2013-11-05 07:11:02 -0500 )edit

i think it is: /move_base/goal But I can't say for certain

Dereck gravatar imageDereck ( 2013-11-05 07:19:19 -0500 )edit

@Dereck thanks, last question is there a way to get the position of the robot?

ctguell gravatar imagectguell ( 2013-11-07 05:30:07 -0500 )edit
1

That's called SLAM, an active research topic and there is a load of solutions. In ROS you would typicly use gmapping, but it's going to take some effort to get running. :) Good luck!

Dereck gravatar imageDereck ( 2013-11-07 06:08:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
13

answered 2013-03-11 07:38:17 -0500

dornhege gravatar image

updated 2013-03-11 07:39:19 -0500

I'm not sure, how move_base handles the /move_base_simple/goal, but if it is an action, you could try sending a fully empty GoalID message to move_base/cancel. According to actionlib/DetailedDescription this should cancel all goals.

The command thus should be fairly simple:

rostopic pub /move_base/cancel actionlib_msgs/GoalID -- {}
edit flag offensive delete link more

Comments

Perfect, I'm not sure what I did wrong last night but this worked out fine. :)

Dereck gravatar imageDereck ( 2013-03-11 07:47:12 -0500 )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

2 followers

Stats

Asked: 2013-03-11 07:17:03 -0500

Seen: 5,750 times

Last updated: Mar 11 '13