ROS Logging improvements ?

asked 2017-04-18 02:43:42 -0500

asmodehn gravatar image

ROS provides a way to log messages from any node to console (output="screen") OR to file (output="log"), out of the box.

However when working on a complex industrial product, I find this logging facility not sufficient.

I am wondering if there is any "success story" about how one should go to extend the existing logging system, to provide a full logging feature coverage for running ROS robots.

I am thinking something along the lines of :

  • logging all messages from each nodes into separate (rotated&compressed) files, maybe even syslog.
  • transferring some of these messages to rosout (logs propagation between nodes, rosout just happens to be the root logging node)
  • storing all rosout messages into a file (same as for any node)
  • showing some of the rosout messages to the terminal open with roslaunch (rosout special case, since it seems other nodes don't get access to the terminal when launched under roslaunch).
  • using a unified API (not mylogger.warning here and rospy.logwarn there...)
  • reordering rosout messages based on log event occurring order (using some vector clock or so), not depending on when rosout receive the message (network delay is really a thing). Probably not doable without extensive modifications though...

Any hints / pointers ?

edit retag flag offensive close merge delete

Comments

Maybe also a tool that allows to "merge" multiple log files in a unified logtext viewer... based on timestamp ?

asmodehn gravatar image asmodehn  ( 2017-04-18 02:52:26 -0500 )edit

Maybe also a proper /rosout/mysupervisor/mynode topic hierarchy, with customizable propagation rules, with rosout managing all these topics, and logging their messages appropriately, following his own configured handlers...

asmodehn gravatar image asmodehn  ( 2017-04-18 03:43:01 -0500 )edit
1

Afaik, rosconsole uses log4cxx, which should allow you to configure a syslog appender (like this fi). That should allow you to make use of all the filtering/aggregation/etc features syslog has.

gvdhoorn gravatar image gvdhoorn  ( 2017-04-23 03:55:05 -0500 )edit

It would probably be good for rosout to stay what it is today: the aggregating stdout of live ROS nodes. All the features that you list are nice, but I'm not sure whether they should be added to rosout (or the ROS logging system itself). Separation of concerns seems like a good thing ..

gvdhoorn gravatar image gvdhoorn  ( 2017-04-23 03:56:13 -0500 )edit

.. and other tools further down the pipeline could filter and persist according to any preference you might have.

gvdhoorn gravatar image gvdhoorn  ( 2017-04-23 04:06:19 -0500 )edit

rqt_console would seem to support some of the things you are looking for already (especially the ordering one), are you looking for infrastructure support for all of your list, or would tools also be ok?

gvdhoorn gravatar image gvdhoorn  ( 2017-04-23 04:10:56 -0500 )edit
1

The current problem is that (at least where I work) ROS developers are used to watch the terminal to check if a problem appears on the console. This is obviously not good enough when a robot breaks without someone watching. I actually don't mind how it is solved...

asmodehn gravatar image asmodehn  ( 2017-04-23 22:19:00 -0500 )edit

I am currently investigating the different tools/libraries ROS has for logging, and how I can extend them, or what I need to do from scratch... But I find them usually lacking compared to what is already available for monitoring general IT systems, so I might roll out some combination of these...

asmodehn gravatar image asmodehn  ( 2017-04-23 22:24:10 -0500 )edit

Piping ros log output to a system facility would allow for:

  • log rotation
  • filtering
  • persistence (even to dbs)
  • manipulation

of log messages.

what is already available for monitoring general IT systems

You mean tools like nagios and others? I've seen systems that combine ..

gvdhoorn gravatar image gvdhoorn  ( 2017-04-24 02:36:15 -0500 )edit

.. rosout to syslog/systemd with ros diagnostics to monitoring tool X proprietary format to get at similar functionality.

gvdhoorn gravatar image gvdhoorn  ( 2017-04-24 02:38:19 -0500 )edit

Oh, any link that I can have a look at ? In the end I'll need something that can fit on a robot, with, eventually, backup on a server... But yes it seems having the possibility to easily log to syslog would be a good first step...

asmodehn gravatar image asmodehn  ( 2017-04-24 03:08:50 -0500 )edit

Did you end up settling on a good solution here?

achille gravatar image achille  ( 2018-07-19 16:41:24 -0500 )edit