epfl-lasa / iiwa_ros

ROS Meta-package for controlling KUKA IIWA
GNU General Public License v3.0
138 stars 42 forks source link

Inverse Dynamic control and gravity compensation problem #108

Open Shravista opened 1 year ago

Shravista commented 1 year ago

Hii,

We are trying out the inverse dynamics controller for the kuka using the mass matrix and velocity product obtained from the /iiwa/iiwa_mass_server and /iiwa/iiwa_gravity_server respectively. In the case of the velocity product, the request to the server is with gravity vector zero and the torques field is the current effort coming from /iiwa/joint_states. The controller looks like this below

inverseDynamicsController

The gravity server requires torques as inputs. why do we need to give torque when requesting the /iiwa/iiwa_gravity_server for the response? Further, what torques do we need to provide, the commanded torques or the torques including gravity compensation?

is the below ros graph correct?

rosgraph

PS: If you have any basic torque controller that uses tracking of a trajectory or setpoint tracking would be of great help.

costashatz commented 1 year ago

First, apologies for the late answer, but I was traveling a lot the last month and didn't get the chance to reply.

The gravity server requires torques as inputs. why do we need to give torque when requesting the /iiwa/iiwa_gravity_server for the response?

This is wrong. Most probably because of some copy-paste. Let me fix that.

is the below ros graph correct?

The graph and the controller looks ok.

Did you manage to make it work?

Shravista commented 1 year ago

Currently, I couldn't make it work and on top of that kuka robot in our lab is under maintenance. So once the maintenance is completed I will test it out. Additionally, I think that mass and inertia matrix values are not so close to the actual robot, I know a way to figure out the same or use the Adaptive Torque controller (similar to the inverse dynamics controller) from Bruno Scillano's book and see the tracking. I will let you know once our robot's maintenance is complete and we tested our controllers.