Ask Your Question
0

rosconsole: log file bloated with ros topics, etc.

asked 2018-07-05 12:32:15 -0600

shardator gravatar image

updated 2018-07-05 14:52:24 -0600

gvdhoorn gravatar image

Hi,

When we are using ROS_DEBUG_STREAM() macro, and the output is configured to screen, everything is fine. But when we configure it to log, and it goes to file, we get extremely bloated lines, like:

1530790045.295181299 DEBUG [/home/whoever/catkin_ws/src/module/src/basecontroller.cpp:175(SomeClass::setGoal) [topics: /rosout, /robotpose, /initialpose, /layers/sensors, /layers/plaser, /layers/plaser2, /layers/pultrasound, /layers/pcamera, /layers/cleaning, /hwctrl, /s_pi, /status/opbutton, /status/cleaned_sqm, /status/clean_rate, /status/clean_start, /status/hw_serial, /status/sw_version, /status/core_status, /status/alert, /twr, /mapfile, /layers/map, /layers/map_inflated, /layers/map_active, ...] SomeClass::setGoal(): new goal has been set (mx=446 my=308 theta=2.35619 speed=0)

instead of like:

1530790045.295181299 DEBUG SomeClass::setGoal(): new goal has been set (mx=446 my=308 theta=2.35619 speed=0)

Is there any way to force this behavior in log files?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-07-06 03:05:04 -0600

bouke gravatar image

You could try messing with the configuration file as documented here. The full documentation of configuration is here. Or you could write a regular expression to filter everything between brackets out, and pipe it to a new file ;)

edit flag offensive delete link more

Comments

Thanks. My only problem is that log4j is quite generic, while the topic listing is very ROS-specific. Also I'm not very sure how to do this for all nodes.

shardator gravatar imageshardator ( 2018-07-06 17:55:55 -0600 )edit

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: 2018-07-05 12:32:15 -0600

Seen: 40 times

Last updated: Jul 06 '18