I have a package which contains a simple URDF as well as a python launch file and some other files. When I run my launch file the model is there in gazebo, however when I make a small change to the urdf and reload it, the model disappears. What's more though is that when I return the file to it's previous configuration, and run the launch file again, the model does not appear. The only way I have found to make it reappear of to power off my operating system and power it back on again. This makes me think that the gazebo configuration is being saved somewhere, however I cannot figure out where this is. The code I am using is based on the tutorial example provided by Aleksandar Haber: Write Launch and URDF/XACRO Models Files and Load them in Gazebo.
-
$\begingroup$ Some additional information would be helpful. Since you are using Python launch files I assume you're using ROS2, which version of Gazebo are you running? Could you provide your launch file and URDFs? And what will the purpose of the models be, static or basic physics models or do they need to be controlled by ROS? $\endgroup$– JustPtrckCommented Oct 24 at 8:36
1 Answer
To my knowledge, there's not such thing as Gazebo saving model-specific configuration data. Moreover, even if this were the case, then rebooting your computer would not fix the issue.
So I rather assume that (part of) Gazebo keeps on running in the background.
Run ps aux
in a terminal and check that there are no Gazebo processes still running in the background. For Gazebo Classic, look for the server and gui processes (gzserver
and gzclient
). See here for some more info.
Also, try starting gazebo with log output enabled.
For Gazebo Sim (i.e. 'new Gazebo' aka 'Gazebo Ignition') this is done with the flag -v 4
, e.g.:
gz sim -v 4 my_world.sdf
I did not find the counterpart for Gazebo Classic, but I assume the same info can be found in its log files, see the documentation here,