Fix comparison in engine_core_constraint_test.
(was comparing number to itself) PiperOrigin-RevId: 705053943 Change-Id: I3d179ab4bb2ed1bc1b74b4edec7ce1114ad16b37
This commit is contained in:
committed by
Copybara-Service
parent
049a260102
commit
3ca97248a3
@@ -477,6 +477,7 @@ TEST_F(CoreConstraintTest, MulJacTVecIsland) {
|
|||||||
mj_deleteModel(model);
|
mj_deleteModel(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// compare mj_constraintUpdate and mj_constraintUpdate_island
|
||||||
TEST_F(CoreConstraintTest, ConstraintUpdateIsland) {
|
TEST_F(CoreConstraintTest, ConstraintUpdateIsland) {
|
||||||
const std::string xml_path = GetTestDataFilePath(kIlslandEfcPath);
|
const std::string xml_path = GetTestDataFilePath(kIlslandEfcPath);
|
||||||
mjModel* model = mj_loadXML(xml_path.c_str(), nullptr, nullptr, 0);
|
mjModel* model = mj_loadXML(xml_path.c_str(), nullptr, nullptr, 0);
|
||||||
@@ -557,12 +558,15 @@ TEST_F(CoreConstraintTest, ConstraintUpdateIsland) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// compare cone Hessians
|
// compare cone Hessians
|
||||||
for (int c=0; c < data2->ncon; c++) {
|
if (cone == mjCONE_ELLIPTIC) {
|
||||||
int efcadr = data2->contact[c].efc_address;
|
for (int c=0; c < data2->ncon; c++) {
|
||||||
if (data2->efc_island[efcadr] == island) {
|
int efcadr = data2->contact[c].efc_address;
|
||||||
for (int j=0; j < 36; j++) {
|
if (data2->efc_island[efcadr] == island &&
|
||||||
EXPECT_THAT(data2->contact[c].H[j],
|
data2->efc_state[efcadr] == mjCNSTRSTATE_CONE) {
|
||||||
DoubleNear(data2->contact[c].H[j], 1e-12));
|
for (int j=0; j < 36; j++) {
|
||||||
|
EXPECT_THAT(data2->contact[c].H[j],
|
||||||
|
DoubleNear(data1->contact[c].H[j], 1e-12));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user