Unable to connect dockerized simulation

Hi, I have created docker image with simulation. It runs fine, I can run the docker with docker run --rm -it -p 18570:18570/udp <docker_image> and I can control the drone from the command line. But I am unable to connect with QGroundControl. I start the docker, then I start the QGC and it does not connect, which should be fine. But I cannot connect even when I go to app settings/comm links and I create a link using
UDP
port: 18570
when I click connect using this created link nowhting happens and QGC stil says Disconnected.
and I am not sure if I should create that server with docker image IP or not? I am on Ubuntu 22.04 in docker and on host.
I have found this Cannot enable MAV_{i}_BROADCAST, but I dont know how to put that -p parameter to be enabled always when I do make px4 build? just how to enable it as default and I even dont know if that is the solution of my issue?
Can anyone help? Please? I am really confused here.

Have a look how it’s done here: GitHub - JonasVautherin/px4-gazebo-headless: An unofficial Ubuntu-based container building and running PX4 SITL (Software In The Loop) through gazebo.

@JulianOes - I know that image, but I dont understand it… :frowning: I do not understand that part with proxies. Can you little explain?
It should be stright forward based on documentation, just run the docker image and connect to exposed port from QGC. Only thing is, it does not work… :frowning: Or I do something wrong.

It seems I have got it :slight_smile: , the exposed port from docker has to be 18570 and then the QGC has to be set :
port = 15871 (just some free port)
and server has to be set 0.0.0.0:18570 - the server ip, is the localhost

1 Like