Hi @danielsanjosepro -- this is the work account of @sea-bass (I recently landed the PR to support Pinocchio 4 in #62).
@ndunkelb-nasa and I were looking at setting up a pure joint impedance controller, and found this is possible by setting the task-space gains to zero and using a projection: none nullspace projector. All clear there.
As we understand, we see that the current mechanism for setting these equivalent joint impedance gains is to set the scalar nullspace_stiffness and nullspace_damping, plus weights as a scaling factor:
|
auto weights = Eigen::VectorXd(model_.nv); |
|
for (size_t i = 0; i < params_.joints.size(); ++i) { |
|
weights[i] = params_.nullspace.weights.joints_map.at(params_.joints.at(i)).value; |
|
} |
|
nullspace_stiffness.diagonal() << params_.nullspace.stiffness * weights; |
|
|
|
// For nullspace, use explicit damping if > 0, otherwise compute from stiffness |
|
if (params_.nullspace.damping > 0) { |
|
nullspace_damping.diagonal() = params_.nullspace.damping * weights; |
|
} else { |
|
nullspace_damping.diagonal() = 2.0 * nullspace_stiffness.diagonal().cwiseSqrt(); |
|
} |
This has one glaring limitation in that the coupling of weights means that the ratios of all the joints' P and D gains are coupled, so we can't express any arbitrary combination of equivalent joint impedance PD gains, per-joint.
We were thinking, would you be open to us submitting a change where nullspace_stiffness and nullspace_damping can actually be vectors instead of scalars? If the vector is a single element, then it applies to all the robot's nv, but otherwise it must be the same size as nv but can have different values.
This would be a breaking change, which is why we ask. It would go from:
nullspace:
stiffness: 5.0
damping: 1.0
projector_type: none
to either
nullspace:
stiffness: [5.0]
damping: [1.0]
projector_type: none
or
nullspace:
stiffness: [5.0, 4.0, 4.0, 3.0, 3.0, 3.0]
damping: [1.0, 0.8, 0.8, 0.75, 0.75, 0.75]
projector_type: none
The other thing would be that at this point, the weights would also be redundant, so we could choose to keep them around for compatibility or simply absorb them into this new vector support.
Thoughts? Or are we missing something else in the usage?
Hi @danielsanjosepro -- this is the work account of @sea-bass (I recently landed the PR to support Pinocchio 4 in #62).
@ndunkelb-nasa and I were looking at setting up a pure joint impedance controller, and found this is possible by setting the task-space gains to zero and using a
projection: nonenullspace projector. All clear there.As we understand, we see that the current mechanism for setting these equivalent joint impedance gains is to set the scalar
nullspace_stiffnessandnullspace_damping, plusweightsas a scaling factor:crisp_controllers/src/cartesian_controller.cpp
Lines 546 to 557 in 4905273
This has one glaring limitation in that the coupling of
weightsmeans that the ratios of all the joints' P and D gains are coupled, so we can't express any arbitrary combination of equivalent joint impedance PD gains, per-joint.We were thinking, would you be open to us submitting a change where
nullspace_stiffnessandnullspace_dampingcan actually be vectors instead of scalars? If the vector is a single element, then it applies to all the robot'snv, but otherwise it must be the same size asnvbut can have different values.This would be a breaking change, which is why we ask. It would go from:
to either
or
The other thing would be that at this point, the
weightswould also be redundant, so we could choose to keep them around for compatibility or simply absorb them into this new vector support.Thoughts? Or are we missing something else in the usage?