version: "3.8" services: mavros: image: git.spirirobotics.com/spiri/services-ros1-mavros:master command: roslaunch mavros px4.launch fcu_url:="udp://:${MAVROS_SIM_FCU_PORT}@127.0.0.1:${MAVROS_SIM_GCS_PORT:-14557}" tgt_system:=${DRONE_SYS_ID:-1} environment: - "ROS_MASTER_URI=http://ros-master:${ROS_MASTER_PORT:-11311}" depends_on: ros-master: condition: service_healthy restart: always deploy: resources: limits: memory: 200M ulimits: nofile: soft: 1024 hard: 524288 ports: - "${MAVROS_SIM_FCU_PORT:-14540}:${MAVROS_SIM_FCU_PORT:-14540}/udp" - "${MAVROS_SIM_GCS_PORT:-14557}:${MAVROS_SIM_GCS_PORT:-14557}/udp" ros-master: image: git.spirirobotics.com/spiri/services-ros1-core:main command: stdbuf -o L roscore --port ${ROS_MASTER_PORT:-11311} environment: - "ROS_MASTER_URI=http://ros-master:${ROS_MASTER_PORT:-11311}" restart: always ports: - "127.0.0.1:${ROS_MASTER_PORT:-11311}:${ROS_MASTER_PORT:-11311}" deploy: resources: limits: memory: 1G ulimits: nofile: soft: 1024 hard: 524288 # gscam: # image: git.spirirobotics.com/spiri/services-ros1-gscam_all_in_one:main # runtime: nvidia # environment: # ROS_MASTER_URI: http://localhost:11311 # ROS_LOG_LEVEL: DEBUG # PORT_GSCAM_CONFIG: > # nvarguscamerasrc sensor-id=0 aelock=true awblock=true ! video/x-raw(memory:NVMM), width=(int)$(arg width), height=(int)$(arg height), format=(string)NV12, framerate=(fraction)$(arg fps)/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR # STARBOARD_GSCAM_CONFIG: > # nvarguscamerasrc sensor-id=1 aelock=true awblock=true ! video/x-raw(memory:NVMM), width=(int)$(arg width), height=(int)$(arg height), format=(string)NV12, framerate=(fraction)$(arg fps)/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR # volumes: # - /tmp/argus_socket:/tmp/argus_socket # # udp-stream: # image: git.spirirobotics.com/spiri/services-ros1-gscam_all_in_one:main # privileged: true # runtime: nvidia # network_mode: host # environment: # DISPLAY: ":0" # volumes: # - /tmp/argus_socket:/tmp/argus_socket # - /tmp/.X11-unix:/tmp/.X11-unix # - /var/run/xauth/:/var/run/xauth/ # command: > # gst-launch-1.0 # nvarguscamerasrc sensor-id=0 # ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)60/1' # ! tee name=raw # raw. ! queue # ! nvegltransform ! nveglglessink sync=false async=false # raw. ! queue # ! videorate max-rate=30 drop-only=true # ! queue max-size-buffers=3 leaky=downstream # ! nvv4l2h265enc # bitrate=2000000 # iframeinterval=300 # vbv-size=33333 # insert-sps-pps=true # control-rate=constant_bitrate # profile=Main # num-B-Frames=0 # ratecontrol-enable=true # preset-level=UltraFastPreset # EnableTwopassCBR=false # maxperf-enable=true # ! rtph265pay name=pay0 pt=96 config-interval=-1 mtu=1400 # ! udpsink host=192.168.1.100 auto-multicast=false port=5600 sync=false async=false # # mavproxy: # image: git.spirirobotics.com/spiri/services-mavproxy:main # command: > # mavproxy.py --non-interactive # --out=udpin:0.0.0.0:14551 # --out=udpin:0.0.0.0:14550 # --out=tcpin:0.0.0.0:5760 # --master=/dev/ttyTHS2 --baudrate 921600 # restart: always # devices: # - "/dev/ttyTHS2:/dev/ttyTHS2" # ports: # - "14550:14550/udp" # - "5760:5760/tcp" # #