How to rename log dir (ROS_DIR/run_id)?

asked 2018-09-25 02:31:16 -0500

Ke Guo gravatar image

updated 2022-03-26 11:27:23 -0500

lucasw gravatar image

The ROS record info automative, the log dir is random like this, it not easy to find the sequence of log dirs? So is there any way to name the log dirs by our owe?

12518db4-bbb4-11e8-be41-001e063189e8  30b92478-bd8b-11e8-8575-001e063189e8  7e78a6ce-bd87-11e8-9076-001e063189e8  latest  1727d3a6-bd8b-11e8-a944-001e063189e8  40360142-bd8a-11e8-a6f2-001e063189e8  914b0c1c-bbb4-11e8-896a-001e063189e8
269f0abc-bbb4-11e8-b37a-001e063189e8  575b6efc-bcd1-11e8-8340-001e063189e8  98c5848e-bd87-11e8-ac97-001e063189e8
28b7bde2-bcbf-11e8-978c-001e063189e8  74a3f530-bc9d-11e8-ab51-001e063189e8  db249574-bd8a-11e8-93dc-001e063189e8
edit retag flag offensive close merge delete

Comments

The name of those directories is identical to the UUID that is used to identify the "session" started by the ROS Master when you start it. It is called the run_id. An example:

setting /run_id to 9a7666b8-c0b1-11e8-9b32-1866da2c09f4

After the master has shut down, you can rename the ..

gvdhoorn gravatar image gvdhoorn  ( 2018-09-25 05:56:55 -0500 )edit

.. directory to whatever you want.

While it is running though, I don't believe that would be a good idea.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-25 05:57:34 -0500 )edit

I've always wonder if it was possible too. Would it be a good workaround to get the /run_id param at the beggining. Then, in a if (ros::isShuttingDown()) condition, search for the log directory according to the param to change its name ? With that it's done when the ros master isn't running.

Delb gravatar image Delb  ( 2018-09-25 07:23:31 -0500 )edit