Store joint damping and stiffness in the private spec when springdamper is used in the public spec.
PiperOrigin-RevId: 724288204 Change-Id: I7341d5d804e1ea73ded48b8b447addd4e124ab97
This commit is contained in:
committed by
Copybara-Service
parent
c27d3758c2
commit
c1ecc50081
@@ -1867,6 +1867,10 @@ void mjCModel::AutoSpringDamper(mjModel* m) {
|
||||
mjtNum stiffness = inertia / std::max(mjMINVAL, timeconst*timeconst*dampratio*dampratio);
|
||||
mjtNum damping = 2 * inertia / std::max(mjMINVAL, timeconst);
|
||||
|
||||
// save stiffness and damping in the private mjsJoints
|
||||
joints_[n]->stiffness = stiffness;
|
||||
joints_[n]->damping = damping;
|
||||
|
||||
// assign
|
||||
m->jnt_stiffness[n] = stiffness;
|
||||
for (int i=0; i<ndim; i++) {
|
||||
|
||||
Reference in New Issue
Block a user