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

Get IK using `ur_modern_driver`

asked 2018-04-12 02:58:35 -0500

prajval10 gravatar image

Is there a way to get Inverse Kinematics using the ur_modern_driver? Something similar to the UR Script function: get_inverse_kin(x, qnear, maxPositionError=1e-10, maxOrientationError=1e-10)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-12 03:06:41 -0500

gvdhoorn gravatar image

This is not functionality the ur_modern_driver provides. The driver is not a bridge into the VM that runs your URScript on the controller, but interfaces with the external motion and input/output capabilities of the controller.

A typical ROS approach would be to either use the services provided by MoveIt (if you're using MoveIt already, see Kinematic Model Tutorial for instance), or load an IK plugin directly into your application / script and use that.

trac_ik was recently extended with Python wrappers, see wiki/trac_ik. You could perhaps use that.

Another alternative could be KDL. There are both C++ and Python interfaces to that available, see wiki/orocos_kinematics_dynamics. Note that this may be slightly involved to get working, as it doesn't seem to have been updated much over the past few years.

edit flag offensive delete link more


Thanks, however if I'd like to use UR inbuilt IK solver, I am publishing the following: pub = rospy.Publisher('/ur_driver/URScript', String, queue_size=10) query= "get_inverse_kin((10,150,100,0,0,0))" pub_command = "%s \n" % (query) pub.publish(pub_command) ...

prajval10 gravatar image prajval10  ( 2018-04-12 07:05:50 -0500 )edit

... The function must return the closest joint positions. However, I'm not able to see anything on the topic /ur_driver/URScript. Is the topic just for sending commands?

prajval10 gravatar image prajval10  ( 2018-04-12 07:09:10 -0500 )edit

Okay. Is there a workaround or should I set up a separate client-server application to access the IK solver?

prajval10 gravatar image prajval10  ( 2018-04-12 07:11:22 -0500 )edit

You cannot do that. The controller does not return any results from statements sent to it over port TCP30002, TCP30003 or TCP30004. So the driver cannot return anything to you either.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-12 07:11:52 -0500 )edit

There is no workaround, as the UR controller just doesn't return any results from URScript statements sent to it over a network connection. That is not a restriction of the driver, but of the controller.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-12 07:13:17 -0500 )edit

You could see whether creating a client-server application works for you. Note that the driver is also partly a URScript program, and you cannot run multiple programs on the controller, so you'll have to carefully manage those two.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-12 07:14:25 -0500 )edit

Question Tools

1 follower


Asked: 2018-04-12 02:58:35 -0500

Seen: 321 times

Last updated: Apr 12 '18