0
$\begingroup$

Rosanswers logo

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)


Originally posted by prajval10 on ROS Answers with karma: 92 on 2018-04-12

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2018-04-12

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by prajval10 on 2018-04-12:
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) ...

Comment by prajval10 on 2018-04-12:
... 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?

Comment by prajval10 on 2018-04-12:
Okay. Is there a workaround or should I set up a separate client-server application to access the IK solver?

Comment by gvdhoorn on 2018-04-12:
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.

Comment by gvdhoorn on 2018-04-12:
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.

Comment by gvdhoorn on 2018-04-12:
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.

$\endgroup$

Your Answer

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