0
$\begingroup$

Rosanswers logo

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


Originally posted by bajo on ROS Answers with karma: 206 on 2014-09-22

Post score: 1


Original comments

Comment by dornhege on 2014-09-22:
Can you maybe just include all launch files in a single launch file?

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2014-09-22

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by bajo with karma: 206 on 2014-09-22

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.