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

Revision history [back]

First, I assume you are using a ROS_INFO_STREAM_NAMED, right? Otherwise, the question would make no sense.

Have a look at the documentation on the ROS wiki. Especiallly this part:

Do not use a variable with changing value as the name

Each named logger is stored in a static variable which is initialized on the use of the macro. Either use a string or a variable which string value is not going to change for future invocations since they won't be affecting the logger anymore.