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

Has the publisher been initialised? This is an error I recently ran into, and from memory, this error will be thrown if you try to publish on a publisher that has been declared as a class variable, but not initialised either in the constructor or in the function body. If it's initialised in the constructor and the instance of the class is in a different scope to the call to publish(), that will also cause this error (say if you construct your instance in your main loop but try to call publish from a subscriber callback).