19 #include <gtest/gtest.h> 33 "<?xml version='1.0' ?>" 35 " <link name='link_0'/>" 36 " <joint name='first_joint' type='fixed'>" 37 " <origin rpy='0 0 0' xyz='1 1 1'/>" 38 " <parent link='link_0'/>" 39 " <child link='link_1'/>" 41 " <link name='link_1'/>" 42 " <joint name='second_joint' type='revolute'>" 43 " <origin rpy='0 0 0' xyz='0 0 0'/>" 44 " <axis xyz='0 0 1'/>" 45 " <limit effort='30' lower='-1.57' upper='1.57' velocity='0.524'/>" 46 " <parent link='link_1'/>" 47 " <child link='link_2'/>" 49 " <link name='link_2'/>" 50 " <joint name='third_joint' type='fixed'>" 51 " <origin rpy='0 -1.5 0' xyz='0 0 0.0526'/>" 52 " <parent link='link_2'/>" 53 " <child link='link_3'/>" 55 " <link name='link_3'/>" 58 TEST(ChainModelTests, BadChainThrows)
64 ASSERT_NO_THROW({
auto uut =
ChainModel(
"uut", tree,
"link_0",
"link_3"); });
66 ASSERT_THROW({
auto uut =
ChainModel(
"uut", tree,
"link_99",
"link_3"); },
69 ASSERT_THROW({
auto uut =
ChainModel(
"uut", tree,
"link_0",
"link_99"); },
73 TEST(Camera3dModelTests, BadChainThrows)
80 {
auto uut =
Camera3dModel(
"uut",
"uut", tree,
"link_0",
"link_3"); });
82 ASSERT_THROW({
auto uut =
Camera3dModel(
"uut",
"uut", tree,
"link_99",
"link_3"); },
85 ASSERT_THROW({
auto uut =
Camera3dModel(
"uut",
"uut", tree,
"link_0",
"link_99"); },
93 int main(
int argc,
char **argv)
95 testing::InitGoogleTest(&argc, argv);
96 return RUN_ALL_TESTS();
std::string robot_description
int main(int argc, char **argv)
KDL_PARSER_PUBLIC bool treeFromString(const std::string &xml, KDL::Tree &tree)
Model of a camera on a kinematic chain.
TEST(CalibrationOffsetParserTests, test_urdf_update)
Model of a kinematic chain. This is the basic instance where we transform the world observations into...