0
$\begingroup$

Rosanswers logo

Hello,

When I use ROS_WARN_STREAM in a cpp file that is launched via a roslaunch file, I do not see the resulting message reported to the screen under nominal conditions. If I leave all logging parameters at their default values, these messages do end up in the log file, but they don't get reported to the screen. If I add 'output="screen"' to the node definition, then I'll see the messages reported to the screen as well.

In other words, it seems to me like the roscpp WARN messages are being treated like INFO messages, in that they are reported to stdout and not stderr under default condtiions. (If I upgrade the WARN messages to ERROR messages, then they appear to be reported to stderr as intended.)

Is anybody else seeing this issue, or am I doing something wrong?

Thanks, Jeremy


Originally posted by engineer on ROS Answers with karma: 11 on 2015-01-09

Post score: 1


Original comments

Comment by Pierre-Louis.k on 2018-01-04:
Hello Jeremy,

I am sorry to dig an already 2y old topic, but I have the same issue. This only happens using cpp but not rospy.This strange behaviour is alredy mentionned here PS:I'm using an kinetic

Comment by Pierre-Louis.k on 2018-01-04:
Also to add info : -The Warning is visible in /rosout with a Warning severity

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

There are two layers that you are working with. The console output is going to stderr. roslaunch is launching the ros node in another process with it's own console output. If you do not tell roslaunch to display the console output to screen it will only capture it and send it to the log file by default. This prevents overloading potentially remote connections with console streams.


Originally posted by tfoote with karma: 58457 on 2018-02-12

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.