ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

You are passing the callback pointer address as the "latch" boolean parameter (3rd parameter in the advertise function) and the compiler is telling you that this will always evaluate to true:

http://www.ros.org/wiki/roscpp/Overview/Publishers%20and%20Subscribers#Publisher_Options

I'm not sure how to get the behavior you want, but what you did is definitely not the way to go.

You are passing the callback pointer address as the "latch" boolean bool latch parameter (3rd parameter in the advertise function) and the compiler is telling you that this will always evaluate to true:

http://www.ros.org/wiki/roscpp/Overview/Publishers%20and%20Subscribers#Publisher_Optionstrue. Here's the documentation where I got this from.

I'm not sure how to get the behavior you want, but what you did is definitely not the way to go.