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

Creating an Inverse Kinematics Service from MoveIt!

asked 2014-10-06 18:59:58 -0600

bjem85 gravatar image

updated 2014-10-07 21:45:36 -0600

Airuno2L gravatar image

Hi All,

I have got my hydraulic arm successfully able to be controlled from MoveIt! and IKFast as per the scenario in http://answers.ros.org/question/19080... , but I can't find the steps for creating a service where I issue a request consisting of Cartesian Coordinates as an input and getting joint angles as an output. There is some stuff about the PR2 arm, but I can't work out how to adapt this for my arm.

Can anybody point me in the right direction?

Kind Regards Bart

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-10-07 07:46:05 -0600

gvdhoorn gravatar image

updated 2014-10-13 02:00:11 -0600

but I can't find the steps for creating a service where I issue a request consisting of Cartesian Coordinates as an input and getting joint angles as an output.

Are you trying to implement your own service, or do you want to use an existing service, which does this for your robot?

If the latter, would the GetPositionIK service from the move_group MoveIt capability work for your use case? Afaik, for the service to work, you should just launch a MoveIt configuration for your arm, populate a moveit_msgs/GetPositionIK with the appropriate info, and invoke the service.

Note that invoking services incurs quite some overhead, so depending on your use case, you might want to look into the MoveIt Kinematics/C++ API. The tutorial should give you enough information on how to use it with your particular robot/urdf.

There is some stuff about the PR2 arm, but I can't work out how to adapt this for my arm.

That tutorial seems to have been written when arm_navigation was still used. I think (but am not sure) you'll have to adapt that quite a bit to get it working with MoveIt.


Edit: with a normal MoveIt configuration for your robot, you should see:

[..]
Loading 'move_group/MoveGroupKinematicsService'...
[..]

in your console, which should give you access to the /compute_fk and /compute_ik services (as I wrote in my original answer). Does this not cover your use case?

I merely mentioned the C++ interface so you'd know about it: it has much less overhead than a ROS service, and with about 4 to 5 lines of initialisation (see the tutorial I linked), I'm guessing it will be around the same programming effort as setting up and working with a ros::ServiceClient.

edit flag offensive delete link more

Comments

I want to implement whatever's the quickest and takes the least work. I already have the move_group node so if possible I'd like to take advantage of that.

bjem85 gravatar image bjem85  ( 2014-10-12 22:52:35 -0600 )edit

See my edit: with a properly configured MoveIt configuration, there is nothing for you to implement.

gvdhoorn gravatar image gvdhoorn  ( 2014-10-13 02:00:58 -0600 )edit

Thanks, I note though that using the move_group node as is also leaves in a lot of unneeded functionality. Is there a guide for what functionality that can be removed?

bjem85 gravatar image bjem85  ( 2014-10-21 17:09:40 -0600 )edit

Aren't you using MoveIt already? The MoveGroupKinematicsService should be loaded automatically then.

You can remove capabilities to load from the capabilities parameter, which is set in launch/move_group.launch of your MoveIt cfg pkg. But all those are generally needed.

gvdhoorn gravatar image gvdhoorn  ( 2014-10-22 01:52:42 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2014-10-06 18:59:58 -0600

Seen: 4,095 times

Last updated: Oct 13 '14