Using PX4 for SITL

I tried to use a fixed wing with camera in gazebo but it was totally failure for me. Because I need to use ROS2 and Gazebo Garden which there is no document about it. However, in the px4 there is readymade plane+camera model. It would be very easy for me but I wonder if it can be a problem that using another autopilot firmware in sitl.

The documentation for ROS 2 with Gazebo and ArduPilot SITL is here: ROS 2 with Gazebo — Dev documentation

The iris quadcopter example in ardupilot_gazebo is equipped with a 3DoF gimbal camera. This output from this is visible in Gazebo using the Image Display widget, in rviz2 using the ros_gz bridge (example here: ardupilot_gz/ardupilot_gz_bringup/config/iris_bridge.yaml at main · ArduPilot/ardupilot_gz · GitHub), and as a UDP H.264 GStream on 127.0.0.1:5600 which can be viewed in QGC or converted to a RTSP stream with a bit of GStreamer manipulation. Details for that here: GitHub - ArduPilot/ardupilot_gazebo: Plugins and models for vehicle simulation in Gazebo Sim with ArduPilot SITL controllers.

The 3DoF gimbal can be added to a plane by following the approach used in the iris_with_gimbal example.

    <include>
      <uri>model://gimbal_small_3d</uri>
      <name>gimbal</name>
      <pose degrees="true">0 -0.01 -0.124923 90 0 90</pose>    
    </include>


    <joint name="gimbal_joint" type="revolute">
      <parent>iris_with_standoffs::base_link</parent>
      <child>gimbal::base_link</child>
      <axis>
        <limit>
          <lower>0</lower>
          <upper>0</upper>
        </limit>
        <xyz>0 0 1</xyz>
      </axis>
    </joint>