Ask Your Question

Actionlib SimpleActionClient

asked 2013-01-26 22:51:42 -0500

Pin Kid gravatar image

updated 2013-01-26 23:27:58 -0500

Hi All,

I was using SimpleActionClient follow this tutorial:

It was able to run it. I try to run multiple goals, but the program stop once there is a goal achieve SUCCEEDED state.

My question here was:

1) is there anyway to terminate MoveBaseClient ac("move_base", true); after achieve the goal and recall another new SimpleActionClient?

2) is there anyway to reset the state into the earliest state of actionlib such as PENDING? So that I can send another goal using the same executable file.

3) How do I use void actionlib::SimpleActionClient< ActionSpec >::setSimpleState(const SimpleGoalState & next_state) ? What value I should put into this function? I test is not a string or char.

Thanks for answering.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-28 19:55:11 -0500

Namal Senarathne gravatar image

It would be helpful if you describe the way you submit multiple goals to the action server. What do you mean by the program stops once the goal status becomes SUCCEEDED?

According to the SimpleActionClient documentation on sendGoal() -

If a previous goal is already active when this is called. We simply forget about that goal and start tracking the new goal. No cancel requests are made.

I have been using SimpleActionClient to send a sequence of goals one after the other without any issue. All I did was to check for the status of the current goal and once it is done, send another goal

if(ac.getState() == actionlib::SimpleClientGoalState::SUCCEEDED)
    // Then, send the next goal
edit flag offensive delete link more



I am using actionlib to move the bsae of the robot to certain coordinates.

I give the coordinates as follows:

move_base_msgs::MoveBaseGoal goal;

goal.target_pose.pose.position.x = 2;

goal.target_pose.pose.position.y = 6;

double th=D2R*(atan2( msg.pose.pose.orientation.y, msg.pose

acp gravatar image acp  ( 2013-06-10 04:52:56 -0500 )edit

geometry_msgs::Quaternion gth = tf::createQuaternionMsgFromYaw(th);

goal.target_pose.pose.orientation =gth;

Then the robot moves to the desired coordinates, however the robot has a rotation behaviour when it reaches the goal.

How can avoid that rotation? I just want the robot to arrive to the des

acp gravatar image acp  ( 2013-06-10 04:53:31 -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


Asked: 2013-01-26 22:51:42 -0500

Seen: 578 times

Last updated: Jan 28 '13