Rollback of 1cda1e7a8c, fixes #3163
Note this change re-opens issue #2472 PiperOrigin-RevId: 884378131 Change-Id: Ifefc345f1a296e5245cbb10047bb678ffea3598f
This commit is contained in:
committed by
Copybara-Service
parent
55f5ac0a1d
commit
a47a18dd28
@@ -737,18 +737,8 @@ static void set0(mjModel* m, mjData* d) {
|
||||
}
|
||||
|
||||
// average diagonal and assign
|
||||
mjtNum tran = (A[0] + A[7] + A[14])/3;
|
||||
mjtNum rot = (A[21] + A[28] + A[35])/3;
|
||||
|
||||
// if one is zero, use the other to prevent degenerate constraints
|
||||
if (tran < mjMINVAL && rot > mjMINVAL) {
|
||||
tran = rot; // use rotation as fallback for translation
|
||||
} else if (rot < mjMINVAL && tran > mjMINVAL) {
|
||||
rot = tran; // use translation as fallback for rotation
|
||||
}
|
||||
|
||||
m->body_invweight0[2*i] = tran;
|
||||
m->body_invweight0[2*i+1] = rot;
|
||||
m->body_invweight0[2*i] = (A[0] + A[7] + A[14])/3;
|
||||
m->body_invweight0[2*i+1] = (A[21] + A[28] + A[35])/3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user