# Communication Problem Between SITL and Gazebo

**URL:** <https://discuss.bluerobotics.com/t/communication-problem-between-sitl-and-gazebo/13997>\
**Category:** QGroundControl\
**Tags:** sitl, simulate\
**Created:** [March 27, 2023, 2:17pm UTC](https://discuss.bluerobotics.com/t/communication-problem-between-sitl-and-gazebo/13997 "2023-03-27T14:17:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zeynep](https://avatars.discourse-cdn.com/v4/letter/z/73ab20/32.png) [@Zeynep](https://discuss.bluerobotics.com/u/Zeynep)\
**Post date:** [March 27, 2023, 2:17pm UTC](https://discuss.bluerobotics.com/t/communication-problem-between-sitl-and-gazebo/13997/1 "2023-03-27T14:17:38Z")

</div>

Hi, I have set up SITL on my QGroundControl. I need to provide communication between SITL and Gazebo. However, I encounter some issues while connecting QGroundControl with Gazebo. I can run QGroundControl with SITL, but when I enter “sim\_vehicle.py -f gazebo-bluerov2 -L RATBeach - -out=udp:0.0.0.0:14550 - -console” the communication can’t be done wit+h gazebo and also I lose communication between QGroundControl and SITL. I have “link 1 down” on the console as an output.  
As far as I figured, the ‘-f’ option in ‘sim.py’ is causing the problem.

The output for SITL:

SIM\_VEHICLE: Start  
SIM\_VEHICLE: Killing tasks  
SIM\_VEHICLE: Starting up at [33.810313, -118.393867, 0.0, 270.0] (RATBeach)  
SIM\_VEHICLE: WAF build  
SIM\_VEHICLE: Configure waf  
SIM\_VEHICLE: “/home/kedy/ardupilot/modules/waf/waf-light” “configure” “–board” “sitl”  
Setting top to : /home/kedy/ardupilot  
Setting out to : /home/kedy/ardupilot/build  
Autoconfiguration : enabled  
Setting board to : sitl  
Using toolchain : native  
Checking for ‘g++’ (C++ compiler) : /usr/lib/ccache/g++  
Checking for ‘gcc’ (C compiler) : /usr/lib/ccache/gcc  
Checking for c flags ‘-MMD’ : yes  
Checking for cxx flags ‘-MMD’ : yes  
CXX Compiler : g++ 9.4.0  
Checking for need to link with librt : not necessary  
Checking for feenableexcept : yes  
Enabled OpenDroneID : no  
Enabled firmware ID checking : no  
GPS Debug Logging : no  
Enabled custom controller : yes  
Checking for HAVE\_CMATH\_ISFINITE : yes  
Checking for HAVE\_CMATH\_ISINF : yes  
Checking for HAVE\_CMATH\_ISNAN : yes  
Checking for NEED\_CMATH\_ISFINITE\_STD\_NAMESPACE : yes  
Checking for NEED\_CMATH\_ISINF\_STD\_NAMESPACE : yes  
Checking for NEED\_CMATH\_ISNAN\_STD\_NAMESPACE : yes  
Checking for header endian.h : yes  
Checking for header byteswap.h : yes  
Checking for HAVE\_MEMRCHR : yes  
Configured VSCode Intellisense: : no  
Checking for program ‘python’ : /usr/bin/python  
Checking for python version \>= 2.7.0 : 3.8.10  
Checking for program ‘python’ : /usr/bin/python  
Checking for python version \>= 2.7.0 : 3.8.10  
DSDL compiler : /home/kedy/ardupilot/modules/uavcan/libuavcan/dsdl\_compiler/libuavcan\_dsdlc  
Source is git repository : yes  
Update submodules : yes  
Checking for program ‘git’ : /usr/bin/git  
Checking for program ‘size’ : /usr/bin/size  
Benchmarks : disabled  
Unit tests : enabled  
Scripting : enabled  
Scripting runtime checks : enabled  
Debug build : disabled  
Coverage build : disabled  
SITL 32-bit build : disabled  
Checking for program ‘rsync’ : /usr/bin/rsync  
‘configure’ finished successfully (0.722s)  
{‘waf\_target’: ‘bin/ardusub’, ‘default\_params\_filename’: ‘default\_params/sub.parm’, ‘model’: ‘gazebo-bluerov2’, ‘sitl-port’: True}  
SIM\_VEHICLE: Building  
SIM\_VEHICLE: “/home/kedy/ardupilot/modules/waf/waf-light” “build” “–target” “bin/ardusub”  
Waf: Entering directory `/home/kedy/ardupilot/build/sitl' Embedding file locations.txt:Tools/autotest/locations.txt Embedding file models/Callisto.json:Tools/autotest/models/Callisto.json Embedding file models/plane-3d.parm:Tools/autotest/models/plane-3d.parm Embedding file models/plane.parm:Tools/autotest/models/plane.parm Embedding file models/xplane_heli.json:Tools/autotest/models/xplane_heli.json Embedding file models/xplane_plane.json:Tools/autotest/models/xplane_plane.json Waf: Leaving directory `/home/kedy/ardupilot/build/sitl’

## BUILD SUMMARY Build directory: /home/kedy/ardupilot/build/sitl Target Text (B) Data (B) BSS (B) Total Flash Used (B) Free Flash (B)

bin/ardusub 3480036 140477 202824 3620513 Not Applicable

Build commands will be stored in build/sitl/compile\_commands.json  
‘build’ finished successfully (1.498s)  
SIM\_VEHICLE: Using defaults from (../Tools/autotest/default\_params/sub.parm)  
SIM\_VEHICLE: Run ArduSub  
SIM\_VEHICLE: “/home/kedy/ardupilot/Tools/autotest/run\_in\_terminal\_window.sh” “ArduSub” “/home/kedy/ardupilot/build/sitl/bin/ardusub” “-S” “–model” “gazebo-bluerov2” “–speedup” “1” “–slave” “0” “–defaults” “../Tools/autotest/default\_params/sub.parm” “–sim-address=127.0.0.1” “-I0” “–home” “33.810313,-118.39386700000001,0.0,270.0”  
RiTW: Starting ArduSub : /home/kedy/ardupilot/build/sitl/bin/ardusub -S --model gazebo-bluerov2 --speedup 1 --slave 0 --defaults ../Tools/autotest/default\_params/sub.parm --sim-address=127.0.0.1 -I0 --home 33.810313,-118.39386700000001,0.0,270.0  
SIM\_VEHICLE: Run MavProxy  
SIM\_VEHICLE: “mavproxy.py” “–out” “127.0.0.1:14550” “–out” “127.0.0.1:14551” “–master” “tcp:127.0.0.1:5760” “–sitl” “127.0.0.1:5501” “–out” “udp:0.0.0.0:14550” “–console”  
Connect tcp:127.0.0.1:5760 source\_system=255  
Loaded module console  
Log Directory:  
Telemetry log: mav.tlog  
Waiting for heartbeat from tcp:127.0.0.1:5760  
MAV\>

The output for Gazebo:

Loading freebuoyancy\_gazebo plugin…  
Loaded freebuoyancy\_gazebo plugin.

I couldn’t understand the problem. How can I solve this issue?

---

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [April 7, 2023, 4:18pm UTC](https://discuss.bluerobotics.com/t/communication-problem-between-sitl-and-gazebo/13997/2 "2023-04-07T16:18:32Z")

</div>

Hi,

I would recommend to have an udp output dedicated to QGC, 14550 is probably being used by gazebo already.

---

<div class="post-metadata">

**Author:** ![omer](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@omer](https://discuss.bluerobotics.com/u/omer)\
**Post date:** [February 23, 2024, 6:42pm UTC](https://discuss.bluerobotics.com/t/communication-problem-between-sitl-and-gazebo/13997/3 "2024-02-23T18:42:48Z")

</div>

Merhaba,  
çözebildin mi problemi

---

<div class="post-metadata">

**Author:** ![Zeynep](https://avatars.discourse-cdn.com/v4/letter/z/73ab20/32.png) [@Zeynep](https://discuss.bluerobotics.com/u/Zeynep)\
**Post date:** [February 23, 2024, 9:31pm UTC](https://discuss.bluerobotics.com/t/communication-problem-between-sitl-and-gazebo/13997/4 "2024-02-23T21:31:24Z")

</div>

Merhaba, çözemedim maalesef ☹ ArduSub’ın kendi sitesindeki modellerle deneyince böyle bir bağlantı hatası verdi. Anlamadım da.

---

<div class="post-metadata">

**Author:** ![omer](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@omer](https://discuss.bluerobotics.com/u/omer)\
**Post date:** [February 24, 2024, 12:18pm UTC](https://discuss.bluerobotics.com/t/communication-problem-between-sitl-and-gazebo/13997/5 "2024-02-24T12:18:39Z")

</div>

Sorunu çözdüm buraya da yazayım belki aynısını yaşayan olur, trajikomik bir şekilde gazebo simülasyonu sol alttaki tuştan başlatmak gerekiyormuş, eğer kurulumlar doğru ise (gazebo 7 veya 8 olmasına gerek yok 9 da çalıştırdım ben) sitl ve gazebo sorunsuz bir şekilde senkronize çalışıyor.

---

<div class="post-metadata">

**Author:** ![Zeynep](https://avatars.discourse-cdn.com/v4/letter/z/73ab20/32.png) [@Zeynep](https://discuss.bluerobotics.com/u/Zeynep)\
**Post date:** [February 26, 2024, 7:00pm UTC](https://discuss.bluerobotics.com/t/communication-problem-between-sitl-and-gazebo/13997/6 "2024-02-26T19:00:43Z")

</div>

Gerçekten trajikomikmiş. Çözüm için teşekkürler 🙂
