Connecting QGroundcontrol to PX4 SITL Running inside Docker

Hi. I am running PX4 SITL inside a docker container. I would like to use QGroundControl outside the docker container (running on host) but I am not able to do that so far. I followed instruction in (https://dev.px4.io/v1.10/en/test_and_ci/docker.html#qgroundcontrol):

  • I used p 14570:14570/udp with the run docker command to expose/forward 14570 port
  • Created comm link in QGC with 14570 port and the docker container IP address.

However, when I try to connect to this link, QGC gives a message that the bounding address is already in use!
But I don’t think that this address is being used. What could be the issue?

Thanks!

1 Like

Try https://github.com/jonasvautherin/px4-gazebo-headless

1 Like

Did you get any fix for this? I am in a similar scenario where I want to connect a PX4 SITL running in a docker with Airsim and QGroundControl

I ended up running QGC inside the container.

@beekay @Mzahana If you forward the mavlink to 14550 (which is the default QGC listens to), it should just work

@Jaeyoung-Lim I currently have the same issue. I’m fairly new to all this, could you provide the steps to forward it? Would this be done in QGC or the docker config?

@mhoang You should try what I suggested in my previous response, to forward the UDP port QGC listens to.

You can go through Networking in Compose | Docker Documentation if you are not sure what to do

@mhoang @Mzahana, you should check your ${FIRMWARE_DIR}/build/px4_sitl_default/etc/init.d-posix/px4-rc.mavlink folder. There you can find the udp_gcs_port_local. That is the value you should be specifying in QGroundControl. The tutorial incorrectly assumes 14570 for everyone, or it has been deprecated.