18 #include <gtest/gtest.h> 20 TEST(ChainManagerTests, test_rosparam_loading)
25 std::vector<std::string> chain_names = manager.
getChains();
26 EXPECT_EQ(static_cast<size_t>(2), chain_names.size());
29 EXPECT_EQ(static_cast<size_t>(7), joint_names.size());
30 EXPECT_EQ(
"arm_lift_joint", joint_names[0]);
31 EXPECT_EQ(
"arm_shoulder_pan_joint", joint_names[1]);
32 EXPECT_EQ(
"arm_shoulder_lift_joint", joint_names[2]);
33 EXPECT_EQ(
"arm_upperarm_roll_joint", joint_names[3]);
34 EXPECT_EQ(
"arm_elbow_flex_joint", joint_names[4]);
35 EXPECT_EQ(
"arm_wrist_flex_joint", joint_names[5]);
36 EXPECT_EQ(
"arm_wrist_roll_joint", joint_names[6]);
39 EXPECT_EQ(static_cast<size_t>(0), joint_names.size());
42 EXPECT_EQ(static_cast<size_t>(2), joint_names.size());
43 EXPECT_EQ(
"head_pan_joint", joint_names[0]);
44 EXPECT_EQ(
"head_tilt_joint", joint_names[1]);
47 EXPECT_EQ(
"arm_group", group_name);
50 EXPECT_EQ(
"", group_name);
53 int main(
int argc,
char** argv)
55 ros::init(argc, argv,
"chain_manager_tests");
56 testing::InitGoogleTest(&argc, argv);
57 return RUN_ALL_TESTS();
TEST(ChainManagerTests, test_rosparam_loading)
std::string getPlanningGroupName(const std::string &chain_name)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
Manages moving joints to a new pose, determining when they are settled, and returning current joint_s...
std::vector< std::string > getChainJointNames(const std::string &chain_name)
Get the joint names associated with a chain. Mainly for testing.
int main(int argc, char **argv)
std::vector< std::string > getChains()
Get the names of chains. Mainly for testing.