Ask Your Question
1

roscpp log warn not reported to stderr

asked 2015-01-09 14:07:30 -0600

engineer gravatar image

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

edit retag flag offensive close merge delete

Comments

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

Pierre-Louis.k gravatar imagePierre-Louis.k ( 2018-01-04 06:50:02 -0600 )edit

Also to add info : -The Warning is visible in /rosout with a Warning severity

Pierre-Louis.k gravatar imagePierre-Louis.k ( 2018-01-04 06:51:22 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-02-12 12:34:41 -0600

tfoote gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-01-09 14:07:30 -0600

Seen: 366 times

Last updated: Feb 12 '18