ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It looks like you "immediately" publish your messages after advertising the topic. Your publishers are probably not up when sending the messages, thus they are just dropped.
There is no built-in way of reliably waiting on the publishers to be up. However, you can latch the topic if messages are not published repeatedly / with a fixed rate (see 1.2):
ros::Publisher publisher = nh.advertise<std_msgs::Int32MultiArray>("Topic_1",1000, true);