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

You're creating your publishers and immediately publishing to them, which usually results in a race condition where subscribers don't receive the first message that you've published. (see this answer for a more detailed explanation).

you should instead create your publishers once, during node startup, and them publish commands to them later.