Robotics StackExchange | Archived questions

No log file after node crashes

I'm currently working on a project, that I briefly described in this other question.

In that question I also referred to the fact that, at some point during execution, the node (demo) crashes with the following error message:

[demo-4] process has died [pid 5767, exit code -11, cmd /home/User/MY_PATH/ROS_trajectory_tracking_controller/devel/lib/dwa_demo/demo __name:=demo __log:=/home/User/.ros/log/baef127e-cd40-11ec-9083-b0c0909328b9/demo-4.log].
log file: /home/User/.ros/log/baef127e-cd40-11ec-9083-b0c0909328b9/demo-4*.log

At the moment I have no clue about why the node crashes since the error message doesn't say much but I'd like to see the log files which seem to be located in /home/User/.ros/log/baef127e-cd40-11ec-9083-b0c0909328b9 folder, specifically they should be named after the node: demo-4*.log.
However these files do not exist, since the content of the folder is:

.
├── map_node-5-stdout.log
├── map_to_odom-3-stdout.log
├── master.log
├── odom_to_base_link-2-stdout.log
├── roslaunch-localhost.localdomain-5741.log
├── rosout-1-stdout.log
└── rosout.log

Does someone know why there are no log files and what to set in order to create them?

EDIT: I've found a GitHub issue that seems to target the issue I'm having, but it's not clear to me if and how they solved the problem.

Asked by 0novanta on 2022-05-06 08:50:20 UTC

Comments

Answers

What people normally do in this situation is:

1) send the log messages to stdout. Messages are displayed immediately, without any buffering. This can be configured in your launch file (per node), or on the roslaunch command line. Be aware that just because roslaunch told you the filename when the node started doesn't mean the node actually wrote anything.

2) Install the tools rqt_console and rqt_logger_level to get access to more detailed messages. These are GUI tools, so it is more complicated because they require a machine with a screen, and the machine must be part of your ros network.

Asked by Mike Scheutzow on 2022-05-06 14:47:11 UTC

Comments