Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It is likely that you need to keep the node up long enough to allow the connection to be established, and then the data sent. rostopic pub does this by setting the topic to be latched, so the last sent message will be sent to a new subscriber upon estabilishing a connection, and then waiting 3 seconds before quitting to allow the connection to be established.