Reduce flex stiffness and bending memory size to the exact amount needed.
PiperOrigin-RevId: 911774147 Change-Id: I3b18eba23e75ec91ece8342945f25e0cd7c63a1a
This commit is contained in:
committed by
Copybara-Service
parent
b6aac76cc4
commit
0c05215e18
@@ -951,7 +951,11 @@ static void mjd_flexInterp_kernel(const mjModel* m, mjData* d, mjtFlexOp op,
|
||||
}
|
||||
|
||||
// get stiffness and damping
|
||||
mjtNum* K = m->flex_stiffness + m->flex_stiffnessadr[f];
|
||||
int stiffnessadr = m->flex_stiffnessadr[f];
|
||||
if (stiffnessadr < 0) {
|
||||
continue;
|
||||
}
|
||||
mjtNum* K = m->flex_stiffness + stiffnessadr;
|
||||
|
||||
// skip if rigid or no stiffness
|
||||
if (m->flex_rigid[f] || K[0] == 0) {
|
||||
|
||||
Reference in New Issue
Block a user