Don't normalize mjData->qpos quaternions in-place.
PiperOrigin-RevId: 647927542 Change-Id: I13b0be55498d1da3af2cdc414cfed4c3908a6fe1
This commit is contained in:
committed by
Copybara-Service
parent
0e19722c61
commit
4d4b0bb2c3
@@ -207,15 +207,11 @@ TEST_F(RelativeFrameSensorTest, ReferencePosMatQuat) {
|
||||
}
|
||||
mj_forward(model, data);
|
||||
|
||||
// note that in the loop above the quat is unnormalized, but that's ok,
|
||||
// quaternions are automatically normalized in place:
|
||||
EXPECT_NEAR(mju_norm(data->qpos+3, 4), 1.0, tol);
|
||||
|
||||
// get values from relative sensors after moving the object
|
||||
std::vector actual_values(data->sensordata+nsensordata/2,
|
||||
data->sensordata+nsensordata);
|
||||
|
||||
// object and reference have moved together, we expect values to not unchange
|
||||
// object and reference have moved together, we expect values to not change
|
||||
EXPECT_THAT(actual_values, Pointwise(DoubleNear(tol), expected_values));
|
||||
|
||||
mj_deleteData(data);
|
||||
|
||||
Reference in New Issue
Block a user