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

cancelGoal crashes if called before any goal has been sent...

asked 2011-02-27 20:50:01 -0600

felix gravatar image

updated 2011-02-27 20:59:17 -0600

cancelGoal crashes if called before one goal has been sent.

[ERROR] [1298889427.632366743]: Trying to cancelGoal() when no goal is running. You are incorrectly using SimpleActionClient
[ERROR] [1298889427.632673206]: Trying to cancel() on an inactive ClientGoalHandle. You are incorrectly using a ClientGoalHandle
Segmentation fault

if you send at least one goal, then it just reports the problem but keep running.

[ERROR] [1298889509.884434617]: BUG: Got a transition to CommState [PREEMPTING] when in SimpleGoalState [DONE]

Is this normal? should I fill a ticket?

(I know, it is stupid to cancel something which does not yet exist... but it should not crash.)

Just to add that cancelAllGoals behaves better and does not crash. It does not even report any error.

By the way, where are the source for these functions (cancelGoal and cancelAllGoals), I cannot find them in my ubuntu virtual box appliance.

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2011-02-28 12:24:26 -0600

vpradeep gravatar image

Felix, thank you for filing a ticket.

This is now being tracked at

edit flag offensive delete link more

answered 2011-02-28 10:10:38 -0600

tfoote gravatar image
edit flag offensive delete link more


@tfoote 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 image ctguell  ( 2013-11-04 08:14:23 -0600 )edit

This is a new question. Please create a new question with enough detail to reproduce your issue.

tfoote gravatar image tfoote  ( 2013-11-04 08:58:29 -0600 )edit

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

ctguell gravatar image ctguell  ( 2013-11-07 05:31:23 -0600 )edit

answered 2011-02-28 15:55:39 -0600

felix gravatar image

By the way, any hints as where are located these functions?

cancelGoal and cancelAllGoals...

I cannot find them in my distrib (Ubuntu with the WG VirtualBox Appliance)

edit flag offensive delete link more

answered 2011-03-03 06:38:17 -0600

vpradeep gravatar image

If you installed ROS using binaries/debians, then you won't necessarily have source files. However, since actionlib is almost entirely header based, you can find the client code using roscd:

roscd actionlib/include/actionlib/client/

You can find cancelGoal and cancelAllGoals in simple_action_client.h

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2011-02-27 20:50:01 -0600

Seen: 993 times

Last updated: Mar 03 '11