MingshanHe / Compliant-Control-and-Application

Compliant Control: 1) admittance control algorithm 2) impedance control algorithm 3) hybrid force&position algorithm in robotic arm (Universal Robot).
https://mingshanhe.github.io/Compliant-Control-and-Application/
MIT License
346 stars 65 forks source link

About the real robot application of the `joint torque controller` #17

Open Luminary-S opened 1 year ago

Luminary-S commented 1 year ago

I tried to apply the code to my real UR3 robot. The followings have been done:

  1. change the ur_robot_driver/config/ur3_controller.yaml
  2. change the bringup launch file
  3. change the load_ur3.launch "hardware_interface/PositionJointInterface" to EffortJointInterface

It gives the following ERROR for the joint torque controller

This controller requires a hardware interface of type 'hardware_interface::EffortJointInterface'. Make sure this is registered in the hardware_interface::RobotHW class.

I have reviewed the ur_robot_driver, and find no place to define a RobotHW for joint torque controller, Can you tell us the details of applying the controller to a real UR robot?

MingshanHe commented 1 year ago

Hi, @Luminary-S, Thanks for your work on the real robot and focus on this project. For the joint torque controller which is used as the PID controller, I am not sure if it is working well in the real robot. I have tested the admittance controller which is used the position interface of the joint. Both the simulation and the real robot are working well. Thus I hope you could simulate it before using the real robot and be careful with your examination. For the error, it is mainly caused by the file in the robot_controller, and you used joint torque controller. Thus I hope you could check the file in the folder. Best, Mingshan He

Luminary-S commented 1 year ago

Hi, @MingshanHe. Great to get your response. Actually, I have checked the joint_torque_controller, and it is completely the same as your repository. In the .xml file, it defines the joint_torque_controller as controller_interface::ControllerBase. I think in the ros_control package, this is defined, but at the UR hardware level, no signal outputs for this interface, so the self-defined joint_torque_controller didn't work. I have reviewed the UR forum. From the post: https://forum.universal-robots.com/t/joint-torque-control/7104, UR+ Development Support Ebbe said "There is no method for setting the joint torques."

Maybe this is the problem. What's your idea?

Go back to the admittance, I have tested the admittance controller which is used the position interface of the joint. Both the simulation and the real robot are working well. does it mean that after the twist is calculated, you resolve it into joint space, and time integrate it to get the next joint position, and put the joint position into the position controller? If it works like this, why don't you directly use the twist controller provided by the UR? Is it the reason of singularity?

Thanks, SGL

MingshanHe commented 1 year ago

Actually, it is sure that the official document and hardware have not provided the joint torque control interface, and you just can simulate it in the ROS. About this, you can define the joint interface type and use the torque controller with it. Yeah, the whole control structure you said is right. And the reason I am not used the twist controller is that this project is recording my study in the compliant control and some ROS packages including the ros controller and KDL. I hope I could get this, thus I have not used that.

zbj165 commented 1 year ago

Have you completed it? I also want to implement admittance control on my UR3 robotic arm now