RussTedrake / manipulation

Course notes for MIT manipulation class
BSD 3-Clause "New" or "Revised" License
392 stars 115 forks source link

JointStiffnessDriver should use InverseDynamics in gravity comp mode #309

Open RussTedrake opened 2 months ago

RussTedrake commented 2 months ago

The current implementation turns off gravity on the specified bodies. This seems elegant, and is correct for many cases. But this has one problem: the effort limits on the input port are now incorrect.

To correctly model the input limits, we need to use the InverseDynamics system with InverseDynamicsMode == kGravityCompensation to compute the gravity comp forces, and pass those in to the input port. (And we should leave gravity enabled on the plant).