Docker SITL and Mavproxy not working with gazebo

Hi,
I use an ARM macbook

I am trying to run:

  1. sim_vehicle.py in a Docker container, exposing port 5760
  2. mavproxy on the host, using nix package, with --master=tcp:127.0.0.1:5760 --out=udp:127.0.0.1:14550
  3. gazebo harmonic on the host, installed with brew. One terminal for the server, one for the ui (gz sim -v4 -s iris_runway.sdf and gz sim -v4 -g)
  4. ardupilot_gazebo is compiled on the host, with the commands given in the repo
  5. QGroundcontrol

Running a non-gazebo model on sim_vehicle.py works: QGroundcontrol sees the drone connect and I can use it normally.

Running gazebo on its own works, I can see the runway and drone and can look around.

Running sim_vehicle.py with --vehicle gazebo-iris and/or --model JSON makes mavproxy fail to connect (it reports link 1 down and nothing further happens), so QGroundcontrol also doesn’t get a connection.

Is it a problem that the sim_vehicle.py runs in the docker container, without ardupilot_gazebo present/configured? Am I missing something major?

Did you solve this? I have the exact same issue.

No, I ended up using PX4 with gazebo :confused:

Do tell if you find a solution, I need to test my software with Ardupilot as well

Hello,

You need to expose port 9001 and 9002 to allow the JSON messaging between SITL and gazebo to pass.

we should probably write this explicitly on the documentation

1 Like

It seems my port 9001 and 9002 are exposed but it is still not working.

I have sim_vehicle.py running on host and it is unable to connect with the gazebo drone.

Edit: i gave up and switched to Px4 lol gazebo classic spun right up on my mac and is working well. If anyone can fix this, I would love to come back to ardupilot