Closed mhl787156 closed 2 years ago
After some investigation, it is definitely linked to https://github.com/PX4/PX4-SITL_gazebo/issues/536 as the sitl_gazebo CMake compiles iris_base.xacro into iris.sdf (https://github.com/PX4/PX4-SITL_gazebo/blob/0da08f0333cd14c08a9545c6ba7ddfc18706398f/CMakeLists.txt#L239). iris base uses the gps xacro which creates a gps model.
The output sdf file then has nested models which cannot be understood by the gazebo parser.
The updated version of PX4 switches to using Jinja and fully deprecates the use of xacro. This would require a re-think of the spawn method as that currently utilises the xacro spawn script.
Jinja would require using something like: https://github.com/PX4/PX4-Autopilot/blob/2e8918da66af37922ededee1cc2d2efffec4cfb2/Tools/gazebo_sitl_multiple_run.sh#L38 instead of xacro within the xacro_launch.sh
iris launch file.
A bug has recently appeared in the standard
starling-sim-iris
container in which it complains thatgps0_joint
is disconnected. I have checked the sdf file in/src/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf
and nothing seems to have broken.It may be related to https://github.com/PX4/PX4-SITL_gazebo/issues/536 as it looks like the repository has since updated (https://github.com/PX4/PX4-SITL_gazebo/blob/a1d9dfaff0b081aa3748be9300d0f07149bee8ac/models/iris/iris.sdf.jinja#L421) and the gps is its own model. But unsure as to why it has suddenly stopped working, perhaps the recent rebuild updated something else...
Possible fix is to update the PX4 repository version within the container.
Error
/src/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf (relevant chunk):