Hi everyone,
I am a PhD student, and me and my team are currently trying to implement the impedance control (both at the joint and cartesian level) with ROS2. We would like to use ROS2 control to send joint torque to the robot and maybe change the stiffness and damping in real-time to achieve variable impedance control. You can have a look at our repo if you want. We are using a KUKA LBR 14.
Unfortunately, KUKA Fast Robot Interface (FRI) seems to not provide APIs to change the stiffness in real-time without stopping and restarting the control, therefore we tried to send the impedance torque directly to the robot via FRI motion overlay. What we did was:
In the LBRServer.java app, we set zero stiffness gains to perform gravity compensation:
control_mode_ = new JointImpedanceControlMode(0, 0, 0, 0, 0, 0, 0);
and we set command type to TORQUE.
Connect to FRI and send joint impedance torques computed as:
tau = K_joint_stiffness * (q_desired - q) - D_joint_damping * q_dot
The problem is that, with our control, the robot always overshoots the target at least one time. This is strange considering that the JointImpedanceControlMode with the same stiffness and damping gains we used performs perfectly. We also tried adding the missing Coriolis term in feed forward, but its contribution was negligible.
We then tried measuring the joint torque for the joint A1 that our controllers compute against the one that the standard controller used, and we saw that there is a difference visible when the robot is moving, see attached image.
We don't know why setting stiffness and damping to zero seems to cancel the missing contribution that is needed to not overshoot.
Do you have any idea?
Thank you in advice