Skip to content

Commit b8cc02d

Browse files
committed
fix(docker): Fix ardupilot SITL docker scripts
Updates related documentation [skip ci]
1 parent 91aa077 commit b8cc02d

File tree

4 files changed

+14
-19
lines changed

4 files changed

+14
-19
lines changed

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ services:
113113
network_mode: host
114114
stdin_open: true
115115
tty: true
116+
#privileged: True
116117
deploy:
117118
resources:
118119
reservations:
119120
devices:
120121
- driver: nvidia
121122
count: 1
122123
capabilities: [ gpu ]
123-
command: bash -c "cd ~ && make gazebo"

docker/ardupilot/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RUN cd $HOME/ardupilot/ && \
3838
Tools/environment_install/install-prereqs-ubuntu.sh -y
3939

4040
# Update PATH
41-
ENV PATH="/usr/lib/ccache:${PATH}:${HOME}/ardupilot/Tools/autotest"
41+
ENV PATH="/usr/lib/ccache:/home/$USERNAME/.local/bin:${PATH}:/home/$USERNAME/ardupilot/Tools/autotest"
4242

4343
# Install Gazebo plugin
4444
RUN cd $HOME && \
@@ -64,4 +64,4 @@ RUN sudo mv -t $HOME/ /gazebo-iris.parm /Makefile && \
6464
cat $HOME/gazebo-iris.parm >> $HOME/ardupilot/Tools/autotest/default_params/gazebo-iris.parm && \
6565
echo "KSQL_Airport=37.523640,-122.255122,1.7,90" >> $HOME/ardupilot/Tools/autotest/locations.txt
6666

67-
CMD ["bash"]
67+
CMD cd $HOME && make sim_vehicle

docker/ardupilot/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
SHELL:=/bin/bash
22

3-
sim_vehicle:
4-
sim_vehicle.py -v ArduCopter -f gazebo-iris -L KSQL_Airport -m '--cmd="module load GPSInput"' &
3+
sim_vehicle: gazebo
4+
sim_vehicle.py -v ArduCopter -f gazebo-iris -L KSQL_Airport -m '--cmd="module load GPSInput"'
55

6-
gazebo: sim_vehicle
6+
gazebo:
77
cd ${HOME} && \
88
if [ -z ${GAZEBO_HEADLESS} ]; then \
99
echo "Launching Gazebo client & server..."; \
10-
gazebo --verbose worlds/ksql_airport.world; \
10+
gazebo --verbose worlds/ksql_airport.world & \
1111
else \
1212
echo "Launching Gazebo in headless mode..."; \
13-
gzserver --verbose worlds/ksql_airport.world; \
13+
gzserver --verbose worlds/ksql_airport.world & \
1414
fi

docs/pages/developer_guide/sitl_environment/docker.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@ Follow these instructions to launch the SITL simulation used in the [mock GPS de
4848
4949
[7]: https://github.com/hmakelin/gisnav/blob/master/README.md#mock-gps-example
5050

51-
### Clone
52-
53-
Clone this repository and change to its root directory:
54-
55-
```bash
56-
cd $HOME
57-
git clone https://github.com/hmakelin/gisnav-docker.git
58-
cd gisnav-docker
59-
```
60-
6151
### Build
6252

6353
To build the `mapserver`, `px4`, `micro-ros-agent`, and `gisnav` services by running the following command:
@@ -162,6 +152,11 @@ ros2 daemon start
162152

163153
### Disable AppArmor for ArduPilot SITL
164154

155+
> dbus[33]: The last reference on a connection was dropped without closing the connection. This is a bug in an
156+
> application. See dbus_connection_unref() documentation for details. Most likely, the application was supposed to call
157+
> dbus_connection_close(), since this is a private connection. D-Bus not built with -rdynamic so unable to print a
158+
> backtrace
159+
165160
**Caution advised**: Possibly needed if using `--network host`: If QGroundControl or Gazebo do not seem to be starting
166161
when running the containers, you may need to run them image with `--security-opt apparmor:unconfined` or `--privileged`
167162
options.
@@ -181,5 +176,5 @@ docker run -it \
181176
--tty \
182177
--network host \
183178
--entrypoint="/bin/bash" \
184-
gisnav-docker-px4
179+
gisnav-px4
185180
```

0 commit comments

Comments
 (0)