0
$\begingroup$

Rosanswers logo

Hi All,

I was using SimpleActionClient follow this tutorial: ros.org/wiki/navigation/Tutorials/SendingSimpleGoals

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.


Originally posted by Pin Kid on ROS Answers with karma: 1 on 2013-01-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

Originally posted by Namal Senarathne with karma: 246 on 2013-01-28

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by acp on 2013-06-10:
Hi

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

Comment by acp on 2013-06-10:
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

$\endgroup$

Your Answer

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