Ask Your Question
1

multiple launch files lead to multiple log directories.

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

bajo gravatar image

Hi,

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

Comments

1

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

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

2 Answers

Sort by ยป oldest newest most voted
0

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
1

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?

From wiki.ros.org/roscore:

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

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: 2014-09-22 05:13:11 -0600

Seen: 105 times

Last updated: Sep 22 '14