miguelprada / ur_test_interfaces

ROS packages to test behaviour of ur_modern_driver position and velocity interfaces.
6 stars 1 forks source link

Hardware interface #1

Open khairidine opened 8 years ago

khairidine commented 8 years ago

Hi Miguel,

I'm triying tu use the ur_modern_driver, The Problem that i developed a controller work good with gazebo but when i shift to the real robot i've noticed that in the ur_hardware_interface there is no hardware_interface::EffortJointInterface, So i can't run my own controller (based to torque control). I'm triying to add this class (hardware_interface::EffortJointInterface) in the hardware_interface but i don't know how can i add it in the (void UrHardwareInterface::write()). Did you try to do a effort interface for ur? Best regards

miguelprada commented 8 years ago

Hi @khairidine,

Unfortunately, I believe that URScript (which is used by ur_modern_driver under the hood) does not provide any means to control the robot via joint torques, therefore adding an EffortJointInterface to the ur_modern_driver would not help you at all.

There is another driver based on a custom server built on top of a low level C API(*). By having a quick look at this report, it seems that the C API does indeed provide a joint torque interface, but I cannot help much more than this. You should post this question in ros-industrial/universal_robot, where the people who have worked with this other driver might help you out.

(*) I believe this API is no longer supported in controllers with version >=3, so it might be out of the question for you.

khairidine commented 8 years ago

Thankd for your reply @miguelprada that means there is no way actualy to apply a impedance control for this kind of robot . and also a force control?

miguelprada commented 8 years ago

If your controller is a CB3, I'm afraid no, there's no way. If you have an older controller there might be a chance this is possible (although probably painful to achieve) using the C API.

What you can do with the ur_modern_driver is to get motor current readings (effort field in the joint handles, should be more or less proportional to joint torques), which you could use to implement an admittance controller, i.e. a controller which generates velocity commands based on the measured forces.

However, you should keep in mind that the UR joint torques are not directly measured, but estimated indirectly (I assume mostly based on motor current), which probably gives imprecise results and therefore not a great basis on which to implement a controller.

Depending on what you're trying to achieve, the force control mode in URScript might be good enough for you. Have you had a look at the reference manual (you should select the one corresponding with the software version in your controller)?

khairidine commented 8 years ago

My controller is a CB3. The idea the use the impedance control or the hybrid control force /position for a dual arm for grasping .In this case i'm not sure that force control mode in URScript might be good enough for this kind of application.