Skip to content

Commit 1ff76bd

Browse files
JafarAbdijorisv
authored andcommitted
Add a unittest that trigger the bug
1 parent 790f997 commit 1ff76bd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

unittest/model.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,4 +1057,20 @@ BOOST_AUTO_TEST_CASE(test_mimicked_mimicking_vectors)
10571057
}
10581058
}
10591059

1060+
BOOST_AUTO_TEST_CASE(test_has_configuration_limit_mimic)
1061+
{
1062+
Model model;
1063+
// j1 -- j2
1064+
// -- j3
1065+
// with j3 mimicking j2
1066+
model.addJoint(0, JointModelRX(), SE3::Identity(), "j1");
1067+
model.addJoint(1, JointModelRX(), SE3::Identity(), "j2");
1068+
model.addJoint(
1069+
2, JointModelMimic(JointModelRX(), model.joints[1], 1., 0.), SE3::Identity(), "j3");
1070+
1071+
BOOST_CHECK_EQUAL(model.lowerPositionLimit.size(), 2);
1072+
BOOST_CHECK_EQUAL(model.upperPositionLimit.size(), 2);
1073+
BOOST_CHECK_EQUAL(model.hasConfigurationLimit().size(), 2);
1074+
}
1075+
10601076
BOOST_AUTO_TEST_SUITE_END()

0 commit comments

Comments
 (0)