CentroEPiaggio / kuka-lwr

Software related to the KUKA LWR 4+: for real and for simulation.
The Unlicense
101 stars 81 forks source link

joint_impedance_controller (real robot + simulation) #62

Closed gpldecha closed 8 years ago

gpldecha commented 8 years ago

Hi have been trying out the the joint_impedance controller which uses an effort interface. In your code you send the following torque:

taucmd(i) = K_(i) * (qdes(i) - qmsr(i)) + D_(i)*dotqmsr.qdot(i) + taudes(i) + taugravity(i);

Now the LWR 4 kuka already takes into account gravity compensation. Running this on the real robot will lead to bad behaviour (in my case). If I send tau_cmd = 0 I get normal gravity compensation with the robot.

I guess the line above is for when using the controller in gazebo. How do you handle between the real LWR which does torque control via impedance control and the gazebo simulator ?

Thanks.

gpldecha commented 8 years ago

My bad I got it working... :)

carlosjoserg commented 8 years ago

Hi @gpldecha... however, you were absolutely right.

Most of the controllers in that folder were developed when the hwiface was more basic, and we wanted to replicate the impedance behavior use it with any other arm as well.

Nowadays, withing the repo, that term tau_gravity_ is not needed anymore, since we rely on the impedance controller within the kuka box. And the gazebo plugin also adds that term as well to minimize the efforts of going from sim to real.