86 lines
2.2 KiB
YAML
86 lines
2.2 KiB
YAML
services:
|
|
px4:
|
|
build: Docker_PX4
|
|
tty: true
|
|
command: make px4_sitl gz_x500
|
|
# command: ign gazebo shapes.sdf --render-engine ogre
|
|
# command: glxgears
|
|
#Make this work with non-nvidia gpus
|
|
privileged: true
|
|
volumes:
|
|
- /tmp/.X11-unix:/tmp/.X11-unix:rw
|
|
|
|
environment:
|
|
- "QT_X11_NO_MITSHM=1"
|
|
# - "HEADLESS=1"
|
|
- DISPLAY=$DISPLAY
|
|
# - ROS_MASTER_URI=http://ros-master:11311
|
|
depends_on:
|
|
ros-master:
|
|
condition: service_healthy
|
|
ports:
|
|
- 14570:14570/udp
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
# cpus: '0.01'
|
|
memory: 1G
|
|
reservations:
|
|
devices:
|
|
#Make this work with nvidia gpus
|
|
- driver: nvidia
|
|
count: 1
|
|
capabilities: [gpu]
|
|
|
|
# PX4_simulator:
|
|
# image: px4io/px4-dev-ros-noetic
|
|
# command: make px4_sitl gz_x500
|
|
# environment:
|
|
# - "ROS_MASTER_URI=http://ros-master:11311"
|
|
# - "DISPLAY"
|
|
# - "QT_X11_NO_MITSHM=1" #fix some QT bugs
|
|
# volumes:
|
|
# #share your x11 socket and permissions to the container
|
|
# - /tmp/.X11-unix:/tmp/.X11-unix:rw
|
|
# depends_on:
|
|
# ros-master:
|
|
# condition: service_healthy
|
|
|
|
ros-master:
|
|
image: ros:noetic-ros-core
|
|
#command: roscore
|
|
command: stdbuf -o L roscore
|
|
environment:
|
|
- "ROS_MASTER_URI=http://ros-master:11311"
|
|
healthcheck:
|
|
test: ["CMD", "/ros_entrypoint.sh", "rostopic", "list"]
|
|
retries: 6
|
|
restart: always
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
# cpus: '0.01'
|
|
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
|
|
hard: 524288
|
|
|
|
rqt:
|
|
image: osrf/ros:noetic-desktop-full
|
|
depends_on:
|
|
ros-master:
|
|
condition: service_healthy
|
|
environment:
|
|
- "ROS_MASTER_URI=http://ros-master:11311"
|
|
- "DISPLAY"
|
|
- "QT_X11_NO_MITSHM=1" #fix some QT bugs
|
|
#share your user to the container in order to access your x11
|
|
user: 1000:1000 #adapt as needed!
|
|
volumes:
|
|
#share your x11 socket and permissions to the container
|
|
- /tmp/.X11-unix:/tmp/.X11-unix:rw
|
|
command: rqt
|