2024-11-01 12:20:08 -03:00
|
|
|
version: "3.8"
|
2024-09-17 12:30:08 -03:00
|
|
|
|
|
|
|
services:
|
2024-09-19 14:14:07 -03:00
|
|
|
gui-tools:
|
2024-10-18 14:08:48 -03:00
|
|
|
runtime: nvidia
|
2024-10-25 14:49:07 -03:00
|
|
|
env_file:
|
|
|
|
- .env
|
2024-09-19 14:14:07 -03:00
|
|
|
build:
|
|
|
|
context: ./guiTools/
|
|
|
|
|
|
|
|
environment:
|
|
|
|
# Display settings
|
|
|
|
- DISPLAY=${DISPLAY}
|
|
|
|
- WAYLAND_DISPLAY=${WAYLAND_DISPLAY}
|
|
|
|
# - QT_QPA_PLATFORM=${QT_QPA_PLATFORM:-xcb} # Default to X11
|
|
|
|
# If running with Wayland
|
|
|
|
- XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}
|
|
|
|
- ROS_MASTER_URI=http://ros-master:11311
|
2024-10-03 17:25:09 -03:00
|
|
|
# - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
|
|
|
|
# - NVIDIA_VISIBLE_DEVICES=all
|
2024-09-19 14:14:07 -03:00
|
|
|
volumes:
|
|
|
|
# X11 socket
|
|
|
|
- /tmp/.X11-unix:/tmp/.X11-unix
|
2024-09-19 14:33:29 -03:00
|
|
|
- ${XAUTHORITY:-~/.Xauthority}:/root/.Xauthority
|
2024-09-19 14:14:07 -03:00
|
|
|
# Wayland socket
|
2024-10-18 14:08:48 -03:00
|
|
|
#- ${XDG_RUNTIME_DIR}/wayland-0:${XDG_RUNTIME_DIR}/wayland-0
|
2024-09-19 14:14:07 -03:00
|
|
|
# Allow access to the host's GPU
|
|
|
|
- /dev/dri:/dev/dri
|
|
|
|
devices:
|
|
|
|
# Provide access to GPU devices
|
|
|
|
- /dev/dri:/dev/dri
|
2024-10-25 14:49:07 -03:00
|
|
|
network_mode: host
|
2024-09-19 14:14:07 -03:00
|
|
|
ipc: host
|
2024-09-19 14:33:29 -03:00
|
|
|
#user: "${UID}:${GID}"
|
2024-11-01 12:20:08 -03:00
|
|
|
privileged: true # Allow privileged access if necessary (e.g., for GPU access)
|
2024-09-19 14:14:07 -03:00
|
|
|
# restart: unless-stopped
|
|
|
|
# command: /bin/bash -c "source /opt/ros/foxy/setup.bash && rvis2" # Replace with the actual command to run Gazebo Ignition
|
2024-11-01 12:20:08 -03:00
|
|
|
profiles: [ui]
|
2024-10-18 14:08:48 -03:00
|
|
|
# deploy:
|
|
|
|
# resources:
|
|
|
|
# reservations:
|
|
|
|
# devices:
|
|
|
|
# - driver: cdi
|
|
|
|
# device_ids:
|
|
|
|
# - nvidia.com/gpu=all
|
2024-09-19 14:14:07 -03:00
|
|
|
|
2024-09-17 12:30:08 -03:00
|
|
|
ardupilot:
|
2024-10-25 14:49:07 -03:00
|
|
|
container_name: ardupilot-$DRONE_SYS_ID
|
|
|
|
env_file:
|
|
|
|
- .env
|
2024-10-29 17:00:57 -03:00
|
|
|
image: git.spirirobotics.com/spiri/ardupilot:spiri-master
|
2024-10-18 14:08:48 -03:00
|
|
|
command:
|
|
|
|
- /bin/bash
|
|
|
|
- -c
|
|
|
|
- |
|
2024-10-25 14:49:07 -03:00
|
|
|
./Tools/autotest/sim_vehicle.py $ARDUPILOT_VEHICLE --no-rebuild \
|
|
|
|
--no-mavproxy --enable-dds --sysid $DRONE_SYS_ID -I$TRACKER_INSTANCE
|
2024-10-29 17:00:57 -03:00
|
|
|
profiles:
|
|
|
|
- uav-sim
|
2024-09-17 12:30:08 -03:00
|
|
|
stdin_open: true
|
|
|
|
tty: true
|
2024-10-25 14:49:07 -03:00
|
|
|
network_mode: host
|
2024-09-17 12:30:08 -03:00
|
|
|
|
|
|
|
mavproxy:
|
2024-10-25 14:49:07 -03:00
|
|
|
container_name: mavproxy-$DRONE_SYS_ID
|
|
|
|
env_file:
|
|
|
|
- .env
|
2024-10-29 17:00:57 -03:00
|
|
|
image: git.spirirobotics.com/spiri/services-mavproxy:main
|
2024-09-17 12:30:08 -03:00
|
|
|
command: >
|
|
|
|
mavproxy.py --non-interactive
|
2024-10-25 14:49:07 -03:00
|
|
|
--master tcp:127.0.0.1:$SERIAL0_PORT
|
2024-10-29 17:00:57 -03:00
|
|
|
--out udpout:0.0.0.0:$MAVROS2_PORT
|
|
|
|
--out udpout:0.0.0.0:$MAVROS1_PORT
|
2024-10-25 14:49:07 -03:00
|
|
|
--sitl 127.0.0.1:$SITL_PORT
|
|
|
|
--out udp:0.0.0.0:14550
|
2024-10-29 17:00:57 -03:00
|
|
|
profiles:
|
|
|
|
- uav-sim
|
|
|
|
ipc: host
|
2024-10-25 14:49:07 -03:00
|
|
|
network_mode: host
|
2024-10-29 17:00:57 -03:00
|
|
|
restart: always
|
2024-09-17 12:30:08 -03:00
|
|
|
|
2024-10-03 17:25:09 -03:00
|
|
|
mavros2:
|
2024-10-25 14:49:07 -03:00
|
|
|
container_name: mavros2-$DRONE_SYS_ID
|
2024-10-29 17:00:57 -03:00
|
|
|
env_file:
|
|
|
|
- .env
|
2024-10-09 14:57:30 -03:00
|
|
|
image: git.spirirobotics.com/spiri/services-ros2-mavros:main
|
2024-10-29 17:00:57 -03:00
|
|
|
command: ros2 launch mavros apm.launch fcu_url:="udp://0.0.0.0:$MAVROS2_PORT@:14555" namespace:="spiri$DRONE_SYS_ID" tgt_system:="$DRONE_SYS_ID"
|
2024-10-25 14:49:07 -03:00
|
|
|
profiles:
|
|
|
|
- uav-sim
|
2024-10-29 17:00:57 -03:00
|
|
|
ipc: host
|
|
|
|
network_mode: host
|
|
|
|
restart: always
|
2024-10-03 17:25:09 -03:00
|
|
|
depends_on:
|
|
|
|
ardupilot:
|
|
|
|
condition: service_started
|
2024-10-25 14:49:07 -03:00
|
|
|
mavproxy:
|
|
|
|
condition: service_started
|
2024-10-29 17:00:57 -03:00
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
# cpus: '0.01'
|
|
|
|
memory: 200M
|
|
|
|
ulimits:
|
|
|
|
nofile:
|
|
|
|
soft: 1024
|
|
|
|
hard: 524288
|
|
|
|
mavros:
|
|
|
|
#This service bridges our mavlink-based robot-coprosessor into ROS
|
|
|
|
#In this example it connects to a simulated coprocessor.
|
|
|
|
container_name: mavros1-$DRONE_SYS_ID
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
image: git.spirirobotics.com/spiri/services-ros1-mavros:master
|
|
|
|
command: rosrun mavros mavros_node __name:=spiri$DRONE_SYS_ID _fcu_url:="udp://0.0.0.0:$MAVROS1_PORT@:14559" _target_system_id:="$DRONE_SYS_ID"
|
|
|
|
profiles:
|
2024-11-01 12:20:08 -03:00
|
|
|
- uav-sim
|
2024-10-25 14:49:07 -03:00
|
|
|
ipc: host
|
|
|
|
network_mode: host
|
2024-10-29 17:00:57 -03:00
|
|
|
restart: always
|
2024-10-03 17:25:09 -03:00
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
# cpus: '0.01'
|
|
|
|
memory: 200M
|
|
|
|
ulimits:
|
|
|
|
nofile:
|
|
|
|
soft: 1024
|
|
|
|
hard: 524288
|
2024-10-29 17:00:57 -03:00
|
|
|
|
|
|
|
ros-master:
|
|
|
|
container_name: ros-master
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
image: git.spirirobotics.com/spiri/services-ros1-core:main
|
|
|
|
command: stdbuf -o L roscore
|
|
|
|
profiles:
|
2024-11-01 12:20:08 -03:00
|
|
|
- ros-master
|
2024-10-29 17:00:57 -03:00
|
|
|
ipc: host
|
|
|
|
network_mode: host
|
|
|
|
restart: always
|
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 1G
|
|
|
|
# Madness, setting a low ulimit here fixes memory leaks
|
|
|
|
# https://answers.ros.org/question/336963/rosout-high-memory-usage/
|
|
|
|
ulimits:
|
|
|
|
nofile:
|
|
|
|
soft: 1024
|
2024-11-01 12:20:08 -03:00
|
|
|
hard: 524288
|