42 #include <test_roscpp/TestArray.h> 44 #define USAGE "USAGE: publish_n_fast <count> <min_size> <max_size>" 48 test_roscpp::TestArray msg;
49 for(
int i = 0; i < msg_count; i++)
52 int j = min_size + (int) ((max_size - min_size) * (rand() / (RAND_MAX + 1.0)));
53 msg.float_arr.resize(j);
54 ROS_INFO(
"published message %d (%d bytes)\n",
61 main(
int argc,
char** argv)
72 int msg_count = atoi(argv[1]);
73 int min_size = atoi(argv[2]);
74 int max_size = atoi(argv[3]);
void publish(const boost::shared_ptr< M const > &message) const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void connectCallback(const ros::SingleSubscriberPublisher &pub, int msg_count, int min_size, int max_size)
int main(int argc, char **argv)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)