0
$\begingroup$

Rosanswers logo

I have been using a simple_action_client to send goals to move_base.

According to the Detailed description of the actionlib (Actionlib Messages):

When sending a goal, the action client generally generates both a unique Goal ID and a timestamp. However, it is possible that naive (aka dumb) clients might leave either of these empty. If so, the action server will populate them.

Empty stamp: Upon receipt by action server, stamp is set to now()

Empty id: Upon receipt by action server, id is auto-generated. Note that this ID is not very useful since, the action client doesn't have any way to know the ID that the server generated for its goal.

This implies to me that there is a way to create your own goal ID and send it with the goal. The only method call to send a goal to the actionlib server is actionlib::SimpleActionClient< ActionSpec >::sendGoal:

void sendGoal (const Goal &goal, SimpleDoneCallback done_cb=SimpleDoneCallback(), SimpleActiveCallback active_cb=SimpleActiveCallback(), SimpleFeedbackCallback feedback_cb=SimpleFeedbackCallback())

The only Goal type I can find associated with move_base is MoveBaseGoal.msg which only includes a geometery_msgs/PoseStamped.msg.

I traced the sendGoal call from the simple_action_client.h to the sendGoal call in action_client.h to the initGoal call in goal_manager_imp.h which is the first place I can find that the goal id is set.

So, my question is If I can, how do I set the goal id of the goal message to move_base?

My goal is to be able to send a goal to move_base and then verify that it received the correct goal by checking the goal_id from the /move_base/status topic. I know that I could edit the actionlib code but that isn't a workable solution for me right now.


Originally posted by virgil93 on ROS Answers with karma: 7 on 2013-03-27

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

When you invoke SendGoal in the simple action client, the GoalID and timestamp are autogenerated, and a GoalHandle object for that goal is stored.

This GoalHandle allows the action client to obtain information about the state of this goal, cancel it, etc (internally it is using the GoalID and timestamp, but you don't need to care about it).

The GoalID is defined in the autogenerated ActionGoal message that wraps the goal message.


Originally posted by toniOliver with karma: 159 on 2013-03-27

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by virgil93 on 2013-03-27:
Does that mean no, I can't set it?

Comment by tfoote on 2013-04-29:
No you cannot set it.

$\endgroup$

Your Answer

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