37 #include <gtest/gtest.h>
58 world.
addToObject(
"ball", ball, Eigen::Isometry3d::Identity());
63 bool move_ok = world.
moveShapeInObject(
"ball", ball, Eigen::Isometry3d(Eigen::Translation3d(0, 0, 9)));
86 world.
addToObject(
"ball", ball, Eigen::Isometry3d::Identity());
94 std::vector<shapes::ShapeConstPtr>
shapes;
101 poses.push_back(Eigen::Isometry3d(Eigen::Translation3d(0, 0, 1)));
102 poses.push_back(Eigen::Isometry3d(Eigen::Translation3d(0, 0, 2)));
103 poses.push_back(Eigen::Isometry3d(Eigen::Translation3d(0, 0, 3)));
118 world.
addToObject(
"ball2", ball, Eigen::Isometry3d(Eigen::Translation3d(0, 0, 4)));
146 ASSERT_EQ(2u,
obj->shapes_.size());
147 ASSERT_EQ(2u,
obj->shape_poses_.size());
153 move_ok = world.
moveShapeInObject(
"mix1", ball, Eigen::Isometry3d(Eigen::Translation3d(0, 0, 5)));
184 World::ObjectConstPtr obj3 = world.
getObject(
"abc");
220 obj_.shapes_.clear();
221 obj_.shape_poses_.clear();
249 world.
addToObject(
"obj1", ball, Eigen::Isometry3d::Identity());
256 bool move_ok = world.
moveShapeInObject(
"obj1", ball, Eigen::Isometry3d(Eigen::Translation3d(0, 0, 1)));
264 world.
addToObject(
"obj1", box, Eigen::Isometry3d::Identity());
277 world.
addToObject(
"obj2", cyl, Eigen::Isometry3d::Identity());
288 world.
addToObject(
"obj3", box, Eigen::Isometry3d::Identity());
368 world.
addToObject(
"obj4", box, Eigen::Isometry3d::Identity());
398 world.
addToObject(
"mix1", box, Eigen::Isometry3d::Identity());
399 world.
addToObject(
"mix1", cyl, Eigen::Isometry3d(Eigen::Translation3d(0, 0, 2)));
402 subframes[
"frame1"] = Eigen::Isometry3d(Eigen::Translation3d(0, 0, 2));
403 subframes[
"frame2"] = Eigen::Isometry3d(Eigen::Translation3d(0, 1, 0));
407 bool found_ok, found_bad;
408 Eigen::Isometry3d pose = world.
getTransform(
"mix1/frame1", found_ok);
421 world.
setObjectPose(
"mix1", Eigen::Isometry3d(Eigen::Translation3d(0, 0, 1)));
441 world.
moveObject(
"mix1", Eigen::Isometry3d(Eigen::Translation3d(0, 0, 1)));
455 world.
setObjectPose(
"mix1", Eigen::Isometry3d(Eigen::Translation3d(0, 0, 1)));
461 int main(
int argc,
char** argv)
463 testing::InitGoogleTest(&argc, argv);
464 return RUN_ALL_TESTS();