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

Waiting for action server when using SimpleActionClient

asked 2011-04-12 05:05:25 -0500

Nash gravatar image

updated 2014-01-28 17:09:31 -0500

ngrennan gravatar image

In my code, I have constructed a SimpleActionClient with the MoveArmAction interface to communicate with move_right_arm action. I have also launched the right_arm_navigation.launch file from pr2_3dnav, but the code does not get past the "move_arm.waitForServer()". It does not throw any errors and the terminal where I launched the right_arm_navigation.launch shows the same "Move arm action started" message before and after I ran my code. I tried reading the debugging messages from the rxconsole, but didnt get very far. We are currently using Diamondback on our PR2.

Does anyone have/had the same problem?

Thanks,

Nash

edit retag flag offensive close merge delete

5 Answers

Sort by ยป oldest newest most voted
2

answered 2011-05-02 15:59:33 -0500

Sachin Chitta gravatar image

I just ran across this error - check and make sure that you are specifying the constraint_region_orientation for the PositionConstraint. You need to either give it a valid orientation or if you just want the identity, make sure that constraint_region_orientation.w = 1.0. By default, ROS quaternion messages are initialized to all 0.0 which is an invalid orientation.

edit flag offensive delete link more

Comments

Thanks!, I had to specify valid constraints for both position and orientation for it to work.
Nash gravatar image Nash  ( 2011-05-11 18:51:29 -0500 )edit
2

answered 2011-04-14 04:48:40 -0500

updated 2011-04-14 04:50:57 -0500

The way action client waits for server is by looking at a bunch of ROS topics and trying to get messages on all of them. You can look at the code in the "actionlib" package to see exactly how it is working

 roscd actionlib
 cd src/actionlib/
 EDITOR action_client.py

That said you should just try

 rostopic list | grep <the name of your topic - something about right arm I guess>

to see which topics are there (they should be something about status/feedback/result) and then

 rostopic echo <topic that you care about>

to see whether the topic is published at all.

edit flag offensive delete link more
2

answered 2011-04-13 13:06:19 -0500

Sachin Chitta gravatar image

I just tried this in diamondback (in the simulator) using the code (in src/move_arm_joint_goal.cpp) in pr2_arm_navigation_tutorials. Are you giving the right argument to the action client - it should be "move_right_arm" if you are addressing the right arm.

edit flag offensive delete link more
1

answered 2011-04-22 09:30:04 -0500

Nash gravatar image

Thanks! I had addressed the "move_r_arm" instead. But now I am encountering another issue, whenever I run the code on the robot, then /environment_server throws an error saying "Unable to transform pose constraint on link 'r_wrist_roll_link' to frame 'odom_combined' " followed by "Could not prepare planning environment" I also tried listening to /environment_server/collision_pose and /environment_server/state_validity but nothing is published whenever I run the code. Also I have to re-launch the "right_arm_navigation.launch" file everytime I want to re-run the code because if I run the code again, it does not get past the "move_arm.wait_for_result()"

Any advice?

edit flag offensive delete link more

Comments

If you are running anything not on the PR2 itself check your ROS_IP variable if it is set to the IP of the laptop/desktop where you are running this.
Dimitar Simeonov gravatar image Dimitar Simeonov  ( 2011-04-25 01:10:48 -0500 )edit
No, I am running everything on the PR2.
Nash gravatar image Nash  ( 2011-04-25 07:32:27 -0500 )edit
When you send move_arm a request, check the timestamp and frame_id on the request. The error message indicates that something went wrong in doing the transformation - usually this is because you have not setup the request properly by specifying the right timestamp or the right frame.
Sachin Chitta gravatar image Sachin Chitta  ( 2011-04-25 14:14:30 -0500 )edit
0

answered 2011-07-26 09:16:38 -0500

tom temple gravatar image

updated 2011-07-27 02:08:28 -0500

I'm having this problem too. I'm running diamondback (1.4.8). I can produce it with pretty recently checked-out pr2 stacks with the following

  1. roslaunch pr2_gazebo pr2_empty_world.launch
  2. roslaunch pr2_3dnav right_arm_navigation.launch
  3. roscd pr2_navigation_tutorials; ./bin/move_arm_joint_goal

This hangs on line 10: move_arm.waitForServer();

roswtf tells me that all the move_right_arm subscriptions are unconnected. rostopic echo move_right_arm/* doesn't give me any messages either.

Can someone confirm this? I followed the relevant tutorials to the letter. I would very much appreciate any debugging suggestions.

Thanks, Tom

edit flag offensive delete link more

Comments

Hey Tom, I ran the exact same commands you posted above, except step 3 should be "roscd pr2_arm_navigation_tutorials". And it worked for me. I might be wrong, but did you make sure that you entered the following "export ROBOT=sim", and your terminal's "ROS_MASTER_URI" is "http://localhost:11311"
Nash gravatar image Nash  ( 2011-07-28 10:13:18 -0500 )edit

Question Tools

Stats

Asked: 2011-04-12 05:05:25 -0500

Seen: 3,119 times

Last updated: Jul 27 '11