Ask Your Question
0

How to link against the URdriver(driver.py) from a ROS node

asked 2015-08-21 00:07:03 -0500

A.M Dynamics gravatar image

Dear All,

I working on UR5 these days. As far as I understood, UR driver(driver.py) in universal package acts like an interface between ROS and URScripts. My question is how I can link a ROS node with this driver From my node. I need to get the torque of joints. To do so, I put two functions in both URscripts and UR driver (driver.py) to be able to communicate with each other but I do not know how to connect my node with UR driver and send command to it from my node. Dose anybody know how?

Thanks,

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-08-24 02:22:03 -0500

gvdhoorn gravatar image

@mig is right (I'm just clarifying some details): the ur_driver package contains a Python ROS node that connects though TCP/IP to the URScript portion of the driver that runs on the UR controller.

Commanding it is done using FollowJointTrajectory actions, and robot state data is broadcast using appropriate publishers (JointState, WrenchStamped, etc). See also the ur_driver wiki page.

As far as I understood, UR driver(driver.py) in universal package acts like an interface between ROS and URScripts.

Not really. The driver is really only meant to make it possible for ROS nodes to control the arm using an actionlib client, and to receive information about the state of the arm by subscribing to the topics provided. It is possible to extend the driver (both the Python and the URScript side) to do whatever you want, but that is not what the driver was necessarily designed for.

So all-in-all there is no linking (in the traditional compiled language sense) involved. Follow @mig's advise, and send the appropriate messages to the provided topics and / or invoke services on the ur_driver node. To receive robot state, subscribe to the /joint_states and other topics. This should be no different from how you work with other ROS nodes.

PS: an older version of the driver did publish joint torques in the effort field of the JointState message, but this was removed when the driver was moved to a different state interface (see universal_robot/issues/125). You might want to comment on issue 125 to let the maintainers know that this should be fixed.

edit flag offensive delete link more
1

answered 2015-08-21 00:59:08 -0500

mgruhler gravatar image

I'm not quite sure what your question is.

the driver.py publishes JointStates as well as Wrench messages. So you can get the torque at the TCP at least by listening to the respective topics. As far as I see, you need to implement a new publisher for getting torques at the different joints (if this can be retrieved from the UR5, I'm no expert there).

For commanding it, you need to send a FollowJointTrajectoryAction from a respective ActionClient.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-08-21 00:07:03 -0500

Seen: 342 times

Last updated: Aug 24 '15