Ask Your Question
1

How to call a function of URscrips (UR5) from a ROS node?

asked 2015-08-17 18:26:55 -0500

A.M Dynamics gravatar image

Dear all users,

I am trying to get feedback from torque of each joint in UR5 using ROS UR universal package. According to URscript manual, there is a Module internals including some functions, one of which is for getting torque of each joint (get_joint_ torques()).

My question is that

1-how can I use this function?

2-Where should I declare it and call it?

3-Do need to change or add anything in driver.py in universal robot package?

4-How can I call these function from a ROS node?

If I create a file and define that standard function in this file, how can I use it, I mean How can I call it from a ROS node?

I really appreciate if you help me out?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-07-12 12:30:57 -0500

AndyZe gravatar image

updated 2017-07-12 17:33:46 -0500

If you need feedback, I think the answer is a client-server connection. Meaning you need a URScript running on the robot pendant and another program (ROS C++ or some other type) on your PC. I know, it's not convenient. See http://www.zacobria.com/universal-rob...

What you suggested about modifying the client script (driver.py) seems like a good idea.

ur_modern_driver (which depends on driver.py) doesn't make joint torques available, but lots of other data is published in src/ur_ros_wrapper.cpp.

This question has an example of calling a URScript function from C++ and here's a Python example.

edit flag offensive delete link more

Comments

Is there anyway we can have control over joint torques?

thompson104 gravatar image thompson104  ( 2017-08-04 22:30:39 -0500 )edit

No, because the UR controller doesn't expose control over those. Not even in URScript.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-05 04:12:12 -0500 )edit

Was thinking more about this... There is the older ur_driver in the ROS industrial package. It actually does make joint torques available by publishing them. Unfortunately it only works on older hardware. That solves the OP's issue, though. @thompson104 you could take that torque feedback and ...

AndyZe gravatar image AndyZe  ( 2017-08-05 07:29:25 -0500 )edit

... Modulate position to get an effective torque controller. It would suck, though. Probably only run at about 4 Hz.

AndyZe gravatar image AndyZe  ( 2017-08-05 07:30:41 -0500 )edit

The same info is available to the ur_modern_driver deserialisers. But the problem is that it's only part of the secondary interface packets, which are broadcast by the controller @ 10Hz. Coupled with the fact that the UR doesn't have actual F/T sensors makes me not too hopeful this would work.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-05 07:34:29 -0500 )edit

Thank you all for the suggestions.

thompson104 gravatar image thompson104  ( 2017-08-09 10:55:39 -0500 )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

3 followers

Stats

Asked: 2015-08-17 18:26:55 -0500

Seen: 621 times

Last updated: Jul 12 '17