From 424aaceee7b4dedc98564aaf385cbbd2f604dc69 Mon Sep 17 00:00:00 2001 From: Anshaj Kumar Date: Wed, 21 Oct 2026 15:35:05 +0530 Subject: [PATCH] docs(simulation): fix Docker networking in QuickStart (#29330) * docs(simulation): fix Docker networking in QuickStart Assisted-by: Codex:ChatGPT * docs(simulation): explain dropping -p and add Linux quickstart command Say why UDP 14550 must not be published on Docker Desktop: Docker then holds the host port and QGroundControl can't bind it. Give Linux and WSL2 readers a ready-made --network host command, restore the WSL2 guidance the removed details block carried, and fix the tip's lead-in colon pointing at the Linux note instead of the commands. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Hamish Willee * docs(sim): reduce complication_ --------- Signed-off-by: Hamish Willee Co-authored-by: Hamish Willee --- .../simulation/px4_simulation_quickstart.md | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/docs/en/simulation/px4_simulation_quickstart.md b/docs/en/simulation/px4_simulation_quickstart.md index 295f491c9bd..25bfa28b4f7 100644 --- a/docs/en/simulation/px4_simulation_quickstart.md +++ b/docs/en/simulation/px4_simulation_quickstart.md @@ -2,44 +2,40 @@ First install [Docker](https://docs.docker.com/get-started/get-docker/) (a free tool that runs containers). -The following command will then run a PX4 quadrotor simulation that you can connect to [QGroundControl](https://qgroundcontrol.com), [MAVSDK](https://mavsdk.mavlink.io/) or [ROS 2](../ros2/user_guide.md) (on Linux, macOS, and Windows): +The following command will then run a PX4 quadrotor simulation that you can connect to [QGroundControl](https://qgroundcontrol.com), [MAVSDK](https://mavsdk.mavlink.io/) or [ROS 2](../ros2/user_guide.md). ```sh -docker run --rm -it -p 14550:14550/udp px4io/px4-sitl:latest +docker run --rm -it px4io/px4-sitl:latest ``` -That's it — open [QGroundControl](https://qgroundcontrol.com) and fly! - -::: details Trouble connecting to QGC? -This command is recommended for Linux and can also be used on Windows (with recent docker/WSL2). -It uses a different mechanism for connecting to the host ports, and will often work in rare cases where the other command does not. +On Linux (or WSL2 without _Docker Desktop_): ```sh docker run --rm -it --network host px4io/px4-sitl:latest ``` -::: +That's it — open [QGroundControl](https://qgroundcontrol.com) and fly! ::: tip -To try [other vehicle types](../sim_sih/#supported-vehicle-types), use the `-e` flag to pass the `PX4_SIM_MODEL` environment variable to the `docker run` command: +To try [other vehicle types](../sim_sih/#supported-vehicle-types), use the `-e` flag to pass the `PX4_SIM_MODEL` environment variable to the `docker run` command (on Linux, or WSL2 without _Docker Desktop_, also add `--network host`): Plane ```sh -docker run --rm -it -p 14550:14550/udp -e PX4_SIM_MODEL=sihsim_airplane px4io/px4-sitl:latest +docker run --rm -it -e PX4_SIM_MODEL=sihsim_airplane px4io/px4-sitl:latest ``` Standard VTOL ```sh -docker run --rm -it -p 14550:14550/udp -e PX4_SIM_MODEL=sihsim_standard_vtol px4io/px4-sitl:latest +docker run --rm -it -e PX4_SIM_MODEL=sihsim_standard_vtol px4io/px4-sitl:latest ``` Ackermann rover ```sh -docker run --rm -it -p 14550:14550/udp -e PX4_SIM_MODEL=sihsim_rover_ackermann px4io/px4-sitl:latest +docker run --rm -it -e PX4_SIM_MODEL=sihsim_rover_ackermann px4io/px4-sitl:latest ``` For more information and options see [Container Images](../simulation/px4_sitl_prebuilt_packages.md#container-images) (in _Pre-built SITL Packages_) and [SIH Simulation](../sim_sih/index.md).