ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have encountered this problem a few times and the solutions were:

  1. Check baudrate is set to 115200 (as others have pointed out)
  2. 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();