I have been using the PidController for my 7dof robot in Drake, and now I want to try out the JointStiffnessController. However, the JointStiffnessController takes in a MultibodyPlant, and it throws an exception if the dimensionality of the plant is different than the dimensionality of the controlled variable. However, my plant has other models besides my robot (e.g. it has a gripper as well, and some cereal boxes). So I have a conceptual question and then a practical question.
-
Conceptually I’m having trouble understanding why the JointStiffnessController needs a plant. I thought that systems were supposed to communicate through the use of input and output ports. Shouldn’t the plant expose some sort of gravity-force output port, per model? When I define my own system, is it okay to take a reference to a plant directly?
-
Practically, how do I update my code in order to use the JointStiffnessController? Should I just make another MultibodyPlant with only my robot and just wire it up to the same scene graph as my other plant?