Ask Your Question
4

subscribing to rosout INFO

asked 2012-05-07 19:41:35 -0500

Carlitos gravatar image

updated 2016-01-08 03:29:22 -0500

130s gravatar image

Hi,

I'm sure this is a noob question but I looked in the wiki and in here for a long time and I could not find the answer.

Is there any way of creating a node that will subscribe to the INFO level rosout logs? Basically, I would like to do a Python node that will react to an INFO message being sent to rosout.

Thanks in advance!

edit retag flag offensive close merge delete

Comments

Thanks Lorenz, I tried subscribing to rosout_agg before but I cannot get anything out of it. The messages that I want to read are there (I confirmed with rostopic echo rosout_agg) but my subscriber doesn't work. Is there something wrong with this: rospy.Subscriber("rosout_agg", String, callback)?

Carlitos gravatar imageCarlitos ( 2012-05-12 16:05:18 -0500 )edit

Yes. The type String is wrong. rosout's topic type is rosgraph_msgs/Log.

Lorenz gravatar imageLorenz ( 2012-05-15 21:44:24 -0500 )edit

1 Answer

Sort by » oldest newest most voted
5

answered 2012-05-08 00:17:33 -0500

Lorenz gravatar image

Nodes send log messages on the topic /rosout. These messages are then received by the rosout node and republished on /rosout_agg. You can subscribe one of these topics, /rosout_agg should be preferred though because subscribing to /rosout might lead to many socket connections to all the nodes running on your system. Have a look at the message type of /rosout_agg, rosgraph_msgs/Log. It should contain all the information you need, i.e. the log level and the message.

Please note that info log messages are only published if the logger level of the node that is sending the log message is set to Info or Debug.

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: 2012-05-07 19:41:35 -0500

Seen: 1,729 times

Last updated: Jan 08 '16