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

When ROS nodes/processes die, the indicated log file is never created.

asked 2022-02-23 18:09:20 -0600

Joshua Kordani gravatar image

updated 2022-02-23 18:09:37 -0600

 [my_nodeman-1] process has died [pid 12043, exit code -11, cmd /opt/ros/kinetic/lib/nodelet/nodelet manager __name:=my_nodeman __log:=/home/jkordani/.ros/log/8e609390-846b-11ec-8d6c-0c96e6a96491/pcgc_nodeman-1.log].
log file: /home/jkordani/.ros/log/8e609390-846b-11ec-8d6c-0c96e6a96491/my_nodeman-1*.log

Often when I encounter errors like these, the log file name never exists. The log folder has logs in it, but not any mentioned by name, so I don't know which file to look through (if there ever really is a specific log file created.

In this case, this node was launched from a launch file. So there are lots of roslaunch*.logs and a rosout/rosout-1-stdout.log which capture the message above that is printed to the console. So what is up with this file?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-02-24 14:48:06 -0600

Mike Scheutzow gravatar image

You don't have to use log files.

In your launch file, you can send a node's messages to stdout (rather than to a log file) by adding the attribute output="screen" to the node's entry in the launch file.

Or you can install the rqt_console utility from apt, and review the log messages in real-time. This requires a desktop.

edit flag offensive delete link more

Comments

So I don't see the log file with the name that is echoed. The nodes in the launch file are configured to output to screen, that is where I see the output above. This is also output to a rosout.log in the folder called out for above (obviously where I also see this message)

I'm just confused that if there's an error and it says look at the logs, if its printing this to the log, then is there new information expected that is not being generated, like in the log file mentioned that is not actually being generated?

Joshua Kordani gravatar image Joshua Kordani  ( 2022-02-25 13:24:40 -0600 )edit

No, that message does not mean there is anything in the log. The log filename is generated at startup in case there is anything to write later on. It is common to get no output when a process crashes.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-02-25 18:32:14 -0600 )edit
0

answered 2022-03-11 14:28:49 -0600

Joshua Kordani gravatar image

Credit goes to Mike Scheutzow for clearing up what is happening. His comment is reproduced below

"That message does not mean there is anything in the log. The log filename is generated at startup in case there is anything to write later on. It is common to get no output when a process crashes."

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-02-23 18:09:20 -0600

Seen: 429 times

Last updated: Mar 11 '22