How to get a ROS 2 node's log folder/file?

asked 2020-06-11 00:10:51 -0500

swaroophs gravatar image

updated 2020-06-11 00:31:11 -0500

When I launch my node, I get a prompt that looks like this:

[INFO] [launch]: All log files can be found below /home/swaroophs/.ros/log/2020-06-11-11-23-16-455437-swarooph-xps-16567

Does rclcpp have a way to get this folder name /home/swaroophs/.ros/log/2020-06-11-11-23-16-455437-swarooph-xps-16567?

The logger.hpp file doesn't seem like what I should be looking at. I looked at the get_name method.

FWIW, I am able to figure this out in ROS 1 by just getting the run_id ROS parameter with ros::param.

edit retag flag offensive close merge delete