# I have been running two planes inside the gazebo, why can not control them？

**URL:** <https://discuss.px4.io/t/i-have-been-running-two-planes-inside-the-gazebo-why-can-not-control-them/3157>\
**Category:** Uncategorized\
**Created:** [April 28, 2017, 1:08pm UTC](https://discuss.px4.io/t/i-have-been-running-two-planes-inside-the-gazebo-why-can-not-control-them/3157 "2017-04-28T13:08:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lenny](https://discuss.px4.io/letter_avatar_proxy/v4/letter/l/ba8739/32.png) [@lenny](https://discuss.px4.io/u/lenny)\
**Post date:** [April 28, 2017, 1:08pm UTC](https://discuss.px4.io/t/i-have-been-running-two-planes-inside-the-gazebo-why-can-not-control-them/3157/1 "2017-04-28T13:08:39Z")

</div>

I refer to this URL：[Multiple instances of PX4 SITL · Issue #6408 · PX4/PX4-Autopilot · GitHub](https://github.com/PX4/Firmware/issues/6408)  
Here is my launch file posix\_sitl\_default

```
<!-- Start first instance of px4 and gazebo model-->
<group ns="uas1">
    <include file="$(find px4)/launch/mylaunch.launch">
        <arg name="name" value="uas1" />
        <arg name="rcS" value="$(find px4)/posix-configs/SITL/init/lpe/iris1"/>
        <arg name="fcu_url" default="udp://:14540@localhost:14557"/>

        <arg name="x" value="0"/>
        <arg name="y" value="0"/>
        <arg name="z" value="0"/>
    </include>
</group>
<!-- Start second instance of px4 and gazebo model-->
<group ns="uas2">
    <include file="$(find px4)/launch/mylaunch.launch">
        <arg name="name" value="uas2" />
        <arg name="rcS" value="$(find px4)/posix-configs/SITL/init/lpe/iris2"/>
        <arg name="fcu_url" default="udp://:14541@localhost:14559" />

        <arg name="x" value="1"/>
        <arg name="y" value="0"/>
        <arg name="z" value="0"/>
    </include>
</group>

```

here is my mylaunch file:

```
<arg name="est" default="lpe"/>
<arg name="vehicle" default="iris"/>
<arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/$(arg vehicle).sdf"/>

<arg name="rcS" default="$(find px4)/posix-configs/SITL/init/$(arg est)/$(arg vehicle)"/>
<arg name="fcu_url" default="udp://:14540@localhost:14557"/>

<!-- px4 instance -->
<node name="sitl" pkg="px4" type="px4" output="screen" args="$(find px4) $(arg rcS)" />

<!-- load model in gazebo -->
<node name="$(anon vehicle_spawn)" output="screen" pkg="gazebo_ros" type="spawn_model"
    args="-sdf -file $(arg sdf) -model $(arg name) -x $(arg x) -y $(arg y) -z $(arg z) -R 0 -P 0 -Y 0"/>

<!-- mavros instance for ROS communication -->
<include file="$(find mavros)/launch/px4.launch">
    <arg name="fcu_url" value="$(arg fcu_url)" />
</include>

```

when i run posix\_sitl\_default,I can not receive Command Line（pxh）and i can communicate with them by roslaunch mavros px4.launch fcu\_url:=“udp://:14540@127.0.0.1:14557”

Can anyone slove this problem?  
best wishes!!

---

<div class="post-metadata">

**Author:** ![lenny](https://discuss.px4.io/letter_avatar_proxy/v4/letter/l/ba8739/32.png) [@lenny](https://discuss.px4.io/u/lenny)\
**Post date:** [April 28, 2017, 1:10pm UTC](https://discuss.px4.io/t/i-have-been-running-two-planes-inside-the-gazebo-why-can-not-control-them/3157/2 "2017-04-28T13:10:06Z")

</div>

i can not communicate with them by roslaunch mavros px4.launch fcu\_url:=“udp://:14540@127.0.0.1:14557”
