Adding camera to iris drone in gazebo simulation and publish images to ROS topic

Hi

I am trying to add a camera to the iris drone to my gazebo simulation. I tried using many models (iris_fpv_cam, iris_downward_depth_camera, iris_stereo_camera …) by changing px4 launch files’ vehicle argument. But i keep getting:

Error: Unknown model 'iris_fpv_cam'
ERROR [px4] Startup script returned with return value: 256

I also tried to modify iris.sdf and iris.xacro files as described here. And I get the following errors:

Error [parser.cc:550] Required attribute[name] in element[collision] is not specified in SDF.
Error [parser.cc:769] Error reading element <collision>
Error [parser.cc:769] Error reading element <link>
Error [parser.cc:769] Error reading element <model>
Error [parser.cc:394] Unable to read element <sdf>
Error:   Could not find the 'robot' element in the xml file
         at line 81 in /build/urdfdom-UJ3kd6/urdfdom-0.4.1/urdf_parser/src/model.cpp
Error [parser_urdf.cc:3408] Unable to call parseURDF on robot model
Error [parser.cc:340] parse as old deprecated model file failed.

Can someone please assist me on how to add a downward camera attached to my drones?

Thank you

Hey,

I have the same problem. Did you find a solution?

Hi @nazakarim I am also facing the same issue. Did you manage to fixed it ?

if you want to use iris_fpv_cam, keep the vehicle argument as ‘iris’ and change the sdf value to iris_fpv_cam directory.

ex:
<arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/iris_fpv_cam/iris_fpv_cam.sdf"/>

or add another argument so you can choose the model type (iris_fpv_cam, iris_downward_depth_camera, iris_stereo_camera …)

<arg name="model" value="iris_fpv_cam" />
<arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg model)/$(arg model).sdf"/>

Thanks alot that will do it.