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

chatter_pub is being destroyed at the end of the function, before the message gets out. You should always create publishers at a more global scope, either as a global variable, or by wrapping your implementation up in a class, and having the chatter_pub as a member variable.

Similar problem to this question, although it was about a subscriber, not a publisher.