Ask Your Question

Passing arguments with action client

asked 2018-04-30 08:38:49 -0600

Krebsileinchen gravatar image

updated 2018-04-30 08:43:42 -0600

I want to control an Franka Emika robot using action servers. The gripper Operation franka_gripper::HomingAction() is working with:

 actionlib::SimpleActionClient<franka_gripper::HomingAction> ac("franka_gripper/homing", true);
 ROS_INFO("Waiting for action server to start.");
 bool success=ac.isServerConnected(); //will wait for infinite time
 if (success)
   {ROS_INFO("Verbindung hergestellt");}
 ROS_INFO("Action server started, sending goal.");
 franka_gripper::HomingGoal goal;

Now I would like to use the MoveAction as descriped in the documentation where I have to pass the arguments for width and speed. However I don't get how to do this. I checked the MoveGoal.msg which tells that two floats are needed. I tried to set them with:

ac.sendGoal(width, speed);

which is not working. Analogously to the tutorial ( ) I used goal.order= in different variation like

goal.order {width, speed};

but it seems not to know the order function. So my question is how I can set this parameters correctly.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-30 11:46:02 -0600

NEngelhard gravatar image

I think you should start with some basic programming tutorials before working with a robot where wrong commands can lead to unsafe movements and injury. (or are you working only in simulation?)

But about your question, it should be simply:

goal.width = 0.05; 
edit flag offensive delete link more


Oh sure.. thank you. No worries I am save.

Krebsileinchen gravatar image Krebsileinchen  ( 2018-05-03 03:01:17 -0600 )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

1 follower


Asked: 2018-04-30 08:38:49 -0600

Seen: 465 times

Last updated: Apr 30 '18