33 #include <gtest/gtest.h>
40 TEST(InteractiveMarkerServer, addRemove)
46 visualization_msgs::InteractiveMarker int_marker;
47 int_marker.name =
"marker1";
50 geometry_msgs::Pose pose;
51 pose.orientation.w = 1.0;
55 ASSERT_TRUE(
server.get(
"marker1", int_marker) );
58 ASSERT_TRUE(
server.get(
"marker1", int_marker) );
60 ASSERT_TRUE(
server.erase(
"marker1" ) );
61 ASSERT_FALSE(
server.get(
"marker1", int_marker) );
64 ASSERT_FALSE(
server.get(
"marker1", int_marker) );
69 ASSERT_TRUE(
server.get(
"marker1", int_marker) );
71 ASSERT_TRUE(
server.erase(
"marker1" ) );
72 ASSERT_FALSE(
server.get(
"marker1", int_marker) );
75 ASSERT_FALSE(
server.get(
"marker1", int_marker) );
79 ASSERT_TRUE(
server.get(
"marker1", int_marker) );
82 ASSERT_TRUE(
server.get(
"marker1", int_marker) );
85 ASSERT_FALSE(
server.get(
"marker1", int_marker) );
88 ASSERT_FALSE(
server.get(
"marker1", int_marker) );
92 ASSERT_TRUE(
server.setPose(
"marker1", pose) );
96 ASSERT_FALSE(
server.get(
"marker1", int_marker) );
101 ASSERT_FALSE(
server.erase(
"marker1") );
104 std::this_thread::sleep_for(std::chrono::microseconds(1000));
109 int main(
int argc,
char **argv)
112 testing::InitGoogleTest(&argc, argv);
113 return RUN_ALL_TESTS();