38 #include <gtest/gtest.h> 43 #include <test_roscpp/TestArray.h> 54 test_roscpp::TestArray outmsg;
65 ROS_INFO(
"received message %d", msg->counter);
82 TEST(SelfSubscribe, advSub)
134 #define USAGE "USAGE: sub_pub <count> <time>" 139 testing::InitGoogleTest(&argc, argv);
153 return RUN_ALL_TESTS();
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void messageCallback(const test_roscpp::TestArrayConstPtr &msg)
Duration & fromSec(double t)
void subscriberCallback(const ros::SingleSubscriberPublisher &, const ros::Publisher &pub)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
Duration & fromNSec(int64_t t)
ROSCPP_DECL void spinOnce()
int main(int argc, char **argv)
TEST(SelfSubscribe, advSub)