From f404003ea0797c827808f56a66418074c2af0f86 Mon Sep 17 00:00:00 2001 From: Tomas Baca Date: Wed, 2 Oct 2024 16:46:16 +0200 Subject: [PATCH] added the sensor diag session --- .../sensor_diagnostics/compose.yaml | 69 +++++++++++++++++++ .../sensor_diagnostics/variables.env | 6 ++ 2 files changed, 75 insertions(+) create mode 100644 docker/uav_session/sensor_diagnostics/compose.yaml create mode 100644 docker/uav_session/sensor_diagnostics/variables.env diff --git a/docker/uav_session/sensor_diagnostics/compose.yaml b/docker/uav_session/sensor_diagnostics/compose.yaml new file mode 100644 index 0000000..200a500 --- /dev/null +++ b/docker/uav_session/sensor_diagnostics/compose.yaml @@ -0,0 +1,69 @@ +volumes: + + uav_custom_files: + +services: + + # will copy uav-specific configs, launch files and other files from the uav-specific docker image to a shared volume + copy_uav_custom_files: + image: fly4future/uav_custom_files:latest + volumes: + - uav_custom_files:/etc/fly4future/uav_custom_files:consistent + command: sh -c "rm -rvf /etc/fly4future/uav_custom_files/*; mkdir -pv /etc/fly4future/uav_custom_files; cp -rv /etc/uav_custom_files/${UAV_TYPE}/${UAV_ID}/* /etc/fly4future/uav_custom_files/" + + # starts roscore + # this is the first container in the ROS pipeline + roscore: + image: ctumrs/mrs_uav_system:robofly + network_mode: host + depends_on: + - copy_uav_custom_files + env_file: + - ./stack.env + command: roscore + + # starts the HW API for connecting the MRS UAV System to PX4 + hw_api: + image: ctumrs/mrs_uav_system:robofly + depends_on: + - rostime + network_mode: host + volumes: + - /dev/:/dev/ + privileged: true + env_file: + - ./stack.env + command: bash -c "waitForTime && roslaunch mrs_uav_px4_api api.launch" + + # starts the camera drivers + cameras: + image: ctumrs/mrs_uav_system:robofly + depends_on: + - rostime + network_mode: host + volumes: + - uav_custom_files:/etc/fly4future/uav_custom_files:consistent + devices: + - /dev/:/dev/ + privileged: true + env_file: + - ./stack.env + command: bash -c "waitForTime && roslaunch /etc/fly4future/uav_custom_files/launch_files/cameras.launch" + + # this container can be used to access a terminal with ROS inside the compose session + terminal: + image: ctumrs/mrs_uav_system:robofly + network_mode: host + depends_on: + - rostime + env_file: + - ./stack.env + entrypoint: ["/bin/bash", "-c"] + volumes: + - uav_custom_files:/etc/fly4future/uav_custom_files:consistent + - /dev/:/dev/ + command: + - bash --rcfile /opt/ros/noetic/setup.bash + privileged: true + stdin_open: true + tty: true diff --git a/docker/uav_session/sensor_diagnostics/variables.env b/docker/uav_session/sensor_diagnostics/variables.env new file mode 100644 index 0000000..a5c23c5 --- /dev/null +++ b/docker/uav_session/sensor_diagnostics/variables.env @@ -0,0 +1,6 @@ +RUN_TYPE=realworld +UAV_NAME=uav80 +UAV_TYPE=robofly +ROS_MASTER_URI=http://localhost:11311 +UAV_MASS=0.8 +UAV_ID=c4750f