Redirecting roslaunch output to log file

asked 2016-10-12 15:28:49 -0500

IanCol gravatar image

Hi There,

I realize ROS stores logs in ~/.ros/log but I find the logs to be difficult to actually use due to their excess of information. Anyway, I tried simply redirecting the output of the roslaunch command to a log file like this:

roslaunch example_package example.launch &> log.txt

The file was "upside down" though, the output from the nodes was first listed (in the correct order) and then at the bottom of the file was the roscore initialization (in correct order).

So instead of this:

... logging to - etc
Checking log directory - etc
[INFO] Node1 ROS_INFO out1
[INFO] Node1 ROS_INFO out2

it was like this:

[INFO] Node1 ROS_INFO out1
[INFO] Node1 ROS_INFO out2
... logging to - etc
Checking log directory - etc
  1. Can someone else reproduce this?
  2. Why is this happening?
  3. How do I get the log file to look identical to the terminal output?

Thanks! Ian

edit retag flag offensive close merge delete