0
$\begingroup$

Here's what I currently see in my terminal when logging:

[ INFO] [1589145832.980129261, 843.227000000]: DriveToTarget received: 
linear_x=0.00 
angular_z=0.00
[ INFO] [1589145832.980202376, 843.227000000]: Drive parameters sent:
linear z = 0.000000
angular z = 0.000000
[ INFO] [1589145833.363180798, 843.266000000]: Driving bot

I have code to log parameters received, sent and indication that the bot is moving. One example is:

DriveToTarget received: 
linear_x=XXXXXX 
angular_z=YYYYY

I can tell that the [INFO] is logged because it is ROS_INFO_STREAM but what are the 2 doubles that are logged before my message, i.e., [1589145832.980129261, 843.227000000]?

$\endgroup$
4
$\begingroup$

The first number is the walltime (sec seconds and nsec nanoseconds since January 1, 1970 UTC).

The second number is the simulated time (also sec.nsec) since you started your simulation environment. (I assume you use some simulation environment like gazebo or similar)

You can configure the rosconsole format as you like by setting the ROSCONSOLE_FORMAT environment variable.

export ROSCONSOLE_FORMAT='[${severity}] [${time}]: ${message}'

have a look at http://wiki.ros.org/rosconsole (Section 6. Console Output Formatting) for the complete list of available variables

happy logging!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.