ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I have encountered this problem a few times and the solutions were:
Check that you are advertising the topic before you attempt to publish it
ros::Publisher my_pub("my_topic", &my_msg);
nh.advertise(my_pub); // <--- I forgot this this and it caused the described problem
my_pub.publish();