Skip to content

Commit 43fb903

Browse files
earlaudedantec
authored andcommitted
Add testcase for default foot ref placement
1 parent 16c3d80 commit 43fb903

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/robot_handler.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,20 @@ BOOST_AUTO_TEST_CASE(model_handler)
150150
pinocchio::computeTotalMass(model, data);
151151
BOOST_CHECK_EQUAL(model_handler.getMass(), data.mass[0]);
152152
}
153+
154+
// Check that the default foot pose actually match the reference configuration
155+
{
156+
const std::string foot_name = "FR_calf";
157+
model_handler.addFoot(foot_name, base_frame);
158+
// Do not set foot reference placement to check the default one
159+
160+
RobotDataHandler data_handler(model_handler);
161+
162+
data_handler.updateInternalData(model_handler.getReferenceState(), false);
163+
164+
// Foot and ref should be coincident with reference configuration
165+
data_handler.getFootPose(foot_name).isApprox(data_handler.getRefFootPose(foot_name));
166+
}
153167
}
154168

155169
BOOST_AUTO_TEST_CASE(data_handler)

0 commit comments

Comments
 (0)