36 #include <gtest/gtest.h> 42 #include <test_roscpp/TestArray.h> 47 TEST(Roscpp, waitForMessage)
52 TestArrayConstPtr msg = topic::waitForMessage<TestArray>(
"test");
56 TEST(Roscpp, waitForMessageWithTimeout)
61 TestArrayConstPtr msg = topic::waitForMessage<TestArray>(
"test",
ros::Duration(1.0));
68 int main(
int argc,
char** argv)
70 testing::InitGoogleTest(&argc, argv);
71 ros::init(argc, argv,
"wait_for_message");
75 return RUN_ALL_TESTS();
int main(int argc, char **argv)
void publish(const boost::shared_ptr< M > &message) const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
TEST(Roscpp, waitForMessage)