33 #include <gtest/gtest.h> 37 TEST(InteractiveMarkerServer, addRemove)
43 visualization_msgs::InteractiveMarker int_marker;
44 int_marker.name =
"marker1";
47 geometry_msgs::Pose pose;
48 pose.orientation.w = 1.0;
52 ASSERT_TRUE( server.
get(
"marker1", int_marker) );
55 ASSERT_TRUE( server.
get(
"marker1", int_marker) );
57 server.
erase(
"marker1" );
58 ASSERT_FALSE( server.
get(
"marker1", int_marker) );
61 ASSERT_FALSE( server.
get(
"marker1", int_marker) );
66 ASSERT_TRUE( server.
get(
"marker1", int_marker) );
68 server.
erase(
"marker1" );
69 ASSERT_FALSE( server.
get(
"marker1", int_marker) );
72 ASSERT_FALSE( server.
get(
"marker1", int_marker) );
76 ASSERT_TRUE( server.
get(
"marker1", int_marker) );
79 ASSERT_TRUE( server.
get(
"marker1", int_marker) );
82 ASSERT_FALSE( server.
get(
"marker1", int_marker) );
85 ASSERT_FALSE( server.
get(
"marker1", int_marker) );
89 ASSERT_TRUE( server.
setPose(
"marker1", pose) );
93 ASSERT_FALSE( server.
get(
"marker1", int_marker) );
103 int main(
int argc,
char **argv)
106 testing::InitGoogleTest(&argc, argv);
107 return RUN_ALL_TESTS();
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
boost::shared_ptr< interactive_markers::InteractiveMarkerServer > server
TEST(InteractiveMarkerServer, addRemove)
bool get(std::string name, visualization_msgs::InteractiveMarker &int_marker) const
void insert(const visualization_msgs::InteractiveMarker &int_marker)
bool setPose(const std::string &name, const geometry_msgs::Pose &pose, const std_msgs::Header &header=std_msgs::Header())
int main(int argc, char **argv)
bool erase(const std::string &name)