15 #include <gtest/gtest.h> 17 #include "vision_msgs/BoundingBox2D.h" 18 #include "vision_msgs/BoundingBox3D.h" 24 EXPECT_FLOAT_EQ(bbox.center.x, 2.5);
25 EXPECT_FLOAT_EQ(bbox.center.y, 4);
26 EXPECT_EQ(bbox.size_x, 3);
27 EXPECT_EQ(bbox.size_y, 4);
28 EXPECT_EQ(bbox.center.theta, 0);
34 EXPECT_FLOAT_EQ(bbox.center.position.x, 3);
35 EXPECT_FLOAT_EQ(bbox.center.position.y, 4.5);
36 EXPECT_FLOAT_EQ(bbox.center.position.z, 6);
37 EXPECT_EQ(bbox.center.orientation.x, 0);
38 EXPECT_EQ(bbox.center.orientation.y, 0);
39 EXPECT_EQ(bbox.center.orientation.z, 0);
40 EXPECT_EQ(bbox.center.orientation.w, 1);
41 EXPECT_EQ(bbox.size.x, 4);
42 EXPECT_EQ(bbox.size.y, 5);
43 EXPECT_EQ(bbox.size.z, 6);
46 int main(
int argc,
char** argv)
48 ::testing::InitGoogleTest(&argc, argv);
49 return RUN_ALL_TESTS();
static BoundingBox3D createAABB3D(uint32_t min_x, uint32_t min_y, uint32_t min_z, uint32_t size_x, uint32_t size_y, uint32_t size_z)
TEST(vision_msgs, CreateAABB2D)
int main(int argc, char **argv)
static BoundingBox2D createAABB2D(uint32_t left, uint32_t top, uint32_t width, uint32_t height)