Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout repository
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
# https://github.com/marketplace/actions/docker-login
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
# https://github.com/marketplace/actions/docker-metadata-action
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
jonasvautherin/px4-gazebo-headless
Expand All @@ -44,7 +44,7 @@ jobs:
type=semver,pattern={{version}}
# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
# Supported platforms
platforms: linux/amd64,linux/arm64/v8
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![GitHub Actions Status](https://github.com/jonasvautherin/px4-gazebo-headless/workflows/Publish%20Docker/badge.svg?branch=master)](https://github.com/jonasvautherin/px4-gazebo-headless)[![Docker pulls](https://img.shields.io/docker/pulls/jonasvautherin/px4-gazebo-headless)](https://hub.docker.com/r/jonasvautherin/px4-gazebo-headless/)[![DockerHub version](https://img.shields.io/docker/v/jonasvautherin/px4-gazebo-headless/1.14.0)](https://hub.docker.com/r/jonasvautherin/px4-gazebo-headless/)
[![GitHub Actions Status](https://github.com/jonasvautherin/px4-gazebo-headless/workflows/Publish%20Docker/badge.svg?branch=master)](https://github.com/jonasvautherin/px4-gazebo-headless)[![Docker pulls](https://img.shields.io/docker/pulls/jonasvautherin/px4-gazebo-headless)](https://hub.docker.com/r/jonasvautherin/px4-gazebo-headless/)[![DockerHub version](https://img.shields.io/docker/v/jonasvautherin/px4-gazebo-headless/1.14.2)](https://hub.docker.com/r/jonasvautherin/px4-gazebo-headless/)


# PX4-Gazebo simulator (headless)
Expand All @@ -7,14 +7,14 @@

The Docker images resulting from this repo are available on [Docker Hub](https://hub.docker.com/r/jonasvautherin/px4-gazebo-headless/).

Note that the following commands are referring to the latest supported release of PX4, which is currently v1.14.0.
Note that the following commands are referring to the latest supported release of PX4, which is currently v1.14.2.

### Run in BROADCAST mode:

In this mode, the simulator will be available from your host (e.g. run the following command, and QGroundControl running on your computer will connect automatically).

```
docker run --rm -it jonasvautherin/px4-gazebo-headless:1.14.0
docker run --rm -it jonasvautherin/px4-gazebo-headless:1.14.2
```

In this configuration, the container will send MAVLink to the host on ports 14550 (for QGC) and 14540 (for e.g. MAVSDK).
Expand All @@ -24,7 +24,7 @@ In this configuration, the container will send MAVLink to the host on ports 1455
This mode is useful for running QGroundControl on the computer running docker, and the offboard app (e.g. using MAVSDK) on another device (e.g. a phone).

```
docker run --rm -it jonasvautherin/px4-gazebo-headless:1.14.0 192.168.0.12
docker run --rm -it jonasvautherin/px4-gazebo-headless:1.14.2 192.168.0.12
```

where `192.168.0.12` should be replaced by the IP listening on the API port 14540 (e.g. MAVSDK or MAVROS).
Expand All @@ -34,7 +34,7 @@ where `192.168.0.12` should be replaced by the IP listening on the API port 1454
This mode is useful for running both QGroundControl and the offboard app (e.g. using MAVSDK) on another device than the one running docker.

```
docker run --rm -it jonasvautherin/px4-gazebo-headless:1.14.0 192.168.0.10 10.0.0.12
docker run --rm -it jonasvautherin/px4-gazebo-headless:1.14.2 192.168.0.10 10.0.0.12
```

where `192.168.0.10` should be replaced by the IP listening on the QGC port 14550 (e.g. QGroundControl) and `10.0.0.12` should be replaced by the IP listening on the API port 14540 (e.g. MAVSDK or MAVROS).
Expand All @@ -44,7 +44,7 @@ where `192.168.0.10` should be replaced by the IP listening on the QGC port 1455
When running with the Typhoon H480 vehicle (with `-v typhoon_h480`), a video stream will be available. Expose it with e.g. `-p 8554:8554`, like so:

```
docker run --rm -it -p 8554:8554 jonasvautherin/px4-gazebo-headless:1.14.0 -v typhoon_h480
docker run --rm -it -p 8554:8554 jonasvautherin/px4-gazebo-headless:1.14.2 -v typhoon_h480
```

### Run with another start location
Expand All @@ -58,12 +58,12 @@ The start location can be set when running the container by setting the followin
For instance:

```
docker run --rm -it --env PX4_HOME_LAT=47.397742 --env PX4_HOME_LON=8.545594 --env PX4_HOME_ALT=488.0 jonasvautherin/px4-gazebo-headless:1.14.0
docker run --rm -it --env PX4_HOME_LAT=47.397742 --env PX4_HOME_LON=8.545594 --env PX4_HOME_ALT=488.0 jonasvautherin/px4-gazebo-headless:1.14.2
```

## Manual build

Note that a clean build from the `master` branch will pull the latest upstream from the PX4 repository (as can be seen [here](https://github.com/JonasVautherin/px4-gazebo-headless/blob/master/Dockerfile#L26)). In order to build a stable version, change `master` for a tag (e.g. `v1.14.0`) in the following commands.
Note that a clean build from the `master` branch will pull the latest upstream from the PX4 repository (as can be seen [here](https://github.com/JonasVautherin/px4-gazebo-headless/blob/master/Dockerfile#L26)). In order to build a stable version, change `master` for a tag (e.g. `v1.14.2`) in the following commands.

### Build the image from this git repository:

Expand Down Expand Up @@ -115,7 +115,7 @@ __Solution:__
The container automatically detects if it is running inside Docker for Windows/Mac, but not if it is inside Docker Toolbox (let me know if you have a way to detect this). However, it seems that in Docker Toolbox, the host is assigned 10.0.2.2 by default (I am guessing this default is coming from VirtualBox). Therefore it works to redirect to this IP, as described above. For instance:

```
docker run --rm -it jonasvautherin/px4-gazebo-headless:1.14.0 10.0.2.2 10.0.2.2
docker run --rm -it jonasvautherin/px4-gazebo-headless:1.14.2 10.0.2.2 10.0.2.2
```

### It doesn't connect with Podman
Expand All @@ -129,5 +129,5 @@ __Solution:__
Try to use the "host network" mode and set the MAVLink interfaces for both interfaces.

```
podman run --rm --network host -it jonasvautherin/px4-gazebo-headless:1.14.0 127.0.0.1 127.0.0.1
podman run --rm --network host -it jonasvautherin/px4-gazebo-headless:1.14.2 127.0.0.1 127.0.0.1
```