ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

multiple launch files lead to multiple log directories.

asked 2014-09-22 05:13:11 -0600

bajo gravatar image


i have multiple launch files which are started from a shell script after the booting of the computer which is on the robot. For some reason this creates multiple directories in $HOME/.ros/log. To find the correct logfiles if we have to debug something is kind of annoying as the files are in all of the directories and we have to check quite a few to find the file which has the newest data written into.

Is there a setting to set the log dir for all nodes? The ones started from roslaunch as well as the roscore which is started with the roscore command and the nodes with are running from rosrun.

thank you. bajo

edit retag flag offensive close merge delete



Can you maybe just include all launch files in a single launch file?

dornhege gravatar image dornhege  ( 2014-09-22 06:00:27 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-09-22 10:54:43 -0600

bajo gravatar image

I thought so as well. But I think i found the problem now, thanks to gvdhoorn mentioning the run_id. It seems that we have the run_id in a parameter file which we load with roslaunch. This caused the second log directory. I removed the run_id from the parameter file now, but this file is sometimes created by our partners so i cann't make sure this does not happen again from time to time. Maybe there a way not to load the run_id parameter.

Anyway. Thank you gvdhoorn and dornhege for your help.

edit flag offensive delete link more

answered 2014-09-22 09:42:32 -0600

gvdhoorn gravatar image

updated 2014-09-22 09:43:31 -0600

If you launch a single roscore prior to loading your launch files, shouldn't they all reuse that running instance?


NOTE: If you use roslaunch, it will automatically start roscore if it detects that it is not already running.

As far as I know, the directory where logfiles end up is determined at the start of roscore (see the runid parameter, and roscpp/Overview/Logging#Output), so all subsequently started nodes' logs should be written to the ~/.ros/log/<runid>/whatever directories.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-09-22 05:13:11 -0600

Seen: 294 times

Last updated: Sep 22 '14