# Launching iris\_fpv\_cam

**URL:** <https://discuss.px4.io/t/launching-iris-fpv-cam/19832>\
**Category:** PX4 Autopilot\
**Created:** [November 30, 2020, 8:47am UTC](https://discuss.px4.io/t/launching-iris-fpv-cam/19832 "2020-11-30T08:47:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohamed\_Ahmed](https://discuss.px4.io/user_avatar/discuss.px4.io/mohamed_ahmed/32/7556_2.png) [@Mohamed\_Ahmed](https://discuss.px4.io/u/Mohamed_Ahmed)\
**Post date:** [November 30, 2020, 8:47am UTC](https://discuss.px4.io/t/launching-iris-fpv-cam/19832/1 "2020-11-30T08:47:15Z")

</div>

I’d like to launch the iris\_fpv\_cam model(iris with a camera). I checked [Running the simulation](https://dev.px4.io/v1.11/en/simulation/gazebo.html#running-the-simulation) but it is not mentioned.  
I tried to follow the same pattern `make px4_sitl gazebo_iris_fpv_cam` but there is no target for it.

then I tried `roslaunch px4 mavros_posix_sitl.launch vehicle:=iris_fpv_cam` as suggested in one of the discussions on GitHub  
output

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

```

I have my px4 sourced in the `.bashrc`

```auto
px4_dir=~/Firmware
source $px4_dir/Tools/setup_gazebo.bash $px4_dir $px4_dir/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$px4_dir
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$px4_dir/Tools/sitl_gazebo

```

I tried a launch file `mylaunch.launch`

```auto
<?xml version="1.0"?>
<launch>
  <include file="$(find px4)/launch/mavros_posix_sitl.launch">
    <arg name="vehicle" value="iris_fpv_cam" />
    <arg name="sdf" value="$(find mavlink_sitl_gazebo)/models/iris_fpv_cam/iris_fpv_cam.sdf"/>
  </include>
</launch>

```

I sourced my workspace and tried to run I get this error, I think because the source of the workspace override the px4 source mentioned above.

```auto
Resource not found: px4
ROS path [0]=/opt/ros/noetic/share/ros
...

```

Is a way to launch iris\_fpv\_cam without creating my own launch file

---

<div class="post-metadata">

**Author:** ![Jaeyoung-Lim](https://discuss.px4.io/user_avatar/discuss.px4.io/jaeyoung-lim/32/10829_2.png) [@Jaeyoung-Lim](https://discuss.px4.io/u/Jaeyoung-Lim)\
**Post date:** [November 30, 2020, 9:53am UTC](https://discuss.px4.io/t/launching-iris-fpv-cam/19832/2 "2020-11-30T09:53:22Z")

</div>

@Mohamed_Ahmed`iris_fpv_cam` model uses a camera model called [`fpv_cam`](https://github.com/PX4/PX4-SITL_gazebo/tree/master/models/fpv_cam) which uses the [`gazebo_ros_camera_plugin`](https://github.com/PX4/PX4-SITL_gazebo/blob/a6698f5e7b4faa68b1ea297f821b15020aa4545e/models/fpv_cam/fpv_cam.sdf#L68)

Therefore it doesn’t make sense to use that model without using it with roslaunch

---

<div class="post-metadata">

**Author:** ![Mohamed\_Ahmed](https://discuss.px4.io/user_avatar/discuss.px4.io/mohamed_ahmed/32/7556_2.png) [@Mohamed\_Ahmed](https://discuss.px4.io/u/Mohamed_Ahmed)\
**Post date:** [November 30, 2020, 11:39am UTC](https://discuss.px4.io/t/launching-iris-fpv-cam/19832/3 "2020-11-30T11:39:32Z")

</div>

I thought that there was a target in the make file as for 3DR iris.  
so I think the problem is with defining the environment variable to the models?

---

<div class="post-metadata">

**Author:** ![Jaeyoung-Lim](https://discuss.px4.io/user_avatar/discuss.px4.io/jaeyoung-lim/32/10829_2.png) [@Jaeyoung-Lim](https://discuss.px4.io/u/Jaeyoung-Lim)\
**Post date:** [November 30, 2020, 12:34pm UTC](https://discuss.px4.io/t/launching-iris-fpv-cam/19832/4 "2020-11-30T12:34:41Z")

</div>

@Mohamed_Ahmed No, what I meant is that you CANNOT use the `iris_fpv_cam` model without using ROS.

Therefore it doesn’t make sense to enable the model to work with the `make` command.

---

<div class="post-metadata">

**Author:** ![Mohamed\_Ahmed](https://discuss.px4.io/user_avatar/discuss.px4.io/mohamed_ahmed/32/7556_2.png) [@Mohamed\_Ahmed](https://discuss.px4.io/u/Mohamed_Ahmed)\
**Post date:** [November 30, 2020, 5:09pm UTC](https://discuss.px4.io/t/launching-iris-fpv-cam/19832/5 "2020-11-30T17:09:27Z")

</div>

I think my problem was about the environment variables.  
I tried to launch `roslaunch px4 mavros_posix_sitl.launch` it gave me errors  
After I set them in the `.bashrc` it worked fine.

```auto
px4_dir=~/Firmware
source /opt/ros/noetic/setup.bash
source ~/drone_ws/devel/setup.bash
source $px4_dir/Tools/setup_gazebo.bash $px4_dir $px4_dir/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$px4_dir
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$px4_dir/Tools/sitl_gazebo
export GAZEBO_PLUGIN_PATH=$GAZEBO_PLUGIN_PATH:/usr/lib/x86_64-linux-gnu/gazebo-11/plugins

```

To launch the iris\_fpv\_cam, I passed the sdf of my model to the sdf argument  
` roslaunch px4 mavros_posix_sitl.launch sdf:=~/Firmware/Tools/sitl_gazebo/models/iris_fpv_cam/iris_fpv_cam.sdf`

another solution is to create your own launch. It can be like this

```auto
<?xml version="1.0"?>
<launch>
    <arg name="vehicle" default="iris"/>
    <arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/iris_fpv_cam/iris_fpv_cam.sdf"/>

    <include file="$(find px4)/launch/mavros_posix_sitl.launch">
        <arg name="respawn_gazebo" value="true"/>
        <arg name="respawn_mavros" value="true"/>
        <arg name="vehicle" value="$(arg vehicle)"/>
        <arg name="sdf" value="$(arg sdf)"/>
        <arg name="verbose" value="true"/>
    </include>
</launch>

```

Thank you very much @Jaeyoung-Lim
