Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In case you wonder why write is never called, rospy.spin() is a blocking function. A short sleep (rospy.sleep(1)) should be enough to create the publisher (and a sleep after the publish ensures that the message is also sent.