Gazebo | Ignition | Community
Ask Your Question

How to set gazebo log dir to a different destination then ~/.gazebo/log

asked 2020-05-03 08:37:34 -0500

altineller gravatar image


I am logging state.log from gazebo-9. But however it insists logging under .gazebo/log.

Is there any way I can set the log dir to a different directory, similar to ROS_LOG_DIR in ros?

Best regards, C.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-05-03 10:58:07 -0500

chapulina gravatar image

updated 2020-05-04 12:23:51 -0500

If you're logging from the command line, you can pass the --record-path flag.

If you're doing it through the C++ API, you can pass the path to LogRecord::Start.

If you're triggering it through a message, you can use the base_path field.

If you're using ROS 1, pass extra_gazebo_args:="--record-path <path>" to empty_world.launch.

If you're using ROS 2, pass record_path to

edit flag offensive delete link more


Hello @chapulina I am launching gazebo trough a launch file, in ros. and the ros gazebo arguments do not include record-path. is there a way I can still use ros, and give this command line argument?


altineller gravatar imagealtineller ( 2020-05-04 07:44:09 -0500 )edit

I updated the answer to include ROS

chapulina gravatar imagechapulina ( 2020-05-04 12:22:46 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-05-03 08:37:34 -0500

Seen: 59 times

Last updated: May 04 '20