hi everyone,
i’m trying to modify the /PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf in order to add a camera to the model. In the end of the iris.sdf.jinja file i added the following:
<!-- CAMERA -->
<!-- link -->
<link name='camera_link'>
<pose frame=''>-0.15 0 0.15 0 1.3 0</pose>
<visual name='camera_visual'>
<pose frame=''>0 0 0 0 0 0</pose>
<geometry>
<box>
<size>3.95 0.95 0.95</size>
</box>
</geometry>
</visual>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<mass>0.015</mass>
<inertia>
<ixx>1e-05</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>1e-05</iyy>
<iyz>0</iyz>
<izz>1e-05</izz>
</inertia>
</inertial>
<sensor type="camera" name="camera1">
<update_rate>30.0</update_rate>
<camera name="head">
<horizontal_fov>1.3962634</horizontal_fov>
<image>
<width>800</width>
<height>800</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.02</near>
<far>300</far>
</clip>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.007</stddev>
</noise>
</camera>
<plugin name="camera_controller" filename="libgazebo_ros_camera.so">
<alwaysOn>true</alwaysOn>
<updateRate>0.0</updateRate>
<cameraName>iris/camera</cameraName>
<imageTopicName>image_raw</imageTopicName>
<cameraInfoTopicName>camera_info</cameraInfoTopicName>
<frameName>/camera_link</frameName>
<hackBaseline>0.07</hackBaseline>
<distortionK1>0.0</distortionK1>
<distortionK2>0.0</distortionK2>
<distortionK3>0.0</distortionK3>
<distortionT1>0.0</distortionT1>
<distortionT2>0.0</distortionT2>
</plugin>
</sensor>
</link>
i also delete the iris.sdf file before ‘make_px4_sitl gazebo’ such that the changes are overwritten. The compilation gives no problem, when gazebo starts i can see the ‘camera link’ in the model tree but there is no ‘image_raw’ topic in ros2… i’m doing something wrong?? thanks.