forked from monemati/PX4-ROS2-Gazebo-YOLOv8
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHow_to_run_ardupilot.sh
More file actions
27 lines (21 loc) · 791 Bytes
/
How_to_run_ardupilot.sh
File metadata and controls
27 lines (21 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Build and run the PX4 simulation in Docker
set -e
docker rm -f px4_ros2_gazebo_yolov8_container 2>/dev/null || true
docker build -f Dockerfile.px4 -t px4_ros2_gazebo_yolov8_image .
xhost +local:docker 2>/dev/null
XAUTH=/tmp/.docker.xauth
touch "$XAUTH"
xauth nlist "$DISPLAY" | sed -e 's/^..../ffff/' | xauth -f "$XAUTH" nmerge -
docker run --privileged -it --gpus all \
-e NVIDIA_DRIVER_CAPABILITIES=all \
-e NVIDIA_VISIBLE_DEVICES=all \
-e MESA_GL_VERSION_OVERRIDE=3.3 \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--env="XAUTHORITY=$XAUTH" \
--volume="$XAUTH:$XAUTH" \
--network=host --ipc=host --shm-size=2gb \
--env="DISPLAY=$DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--rm --name px4_ros2_gazebo_yolov8_container \
px4_ros2_gazebo_yolov8_image