diff --git a/multivehicle/README.md b/multivehicle/README.md index cb69a89..a9be4e9 100644 --- a/multivehicle/README.md +++ b/multivehicle/README.md @@ -23,7 +23,7 @@ cd src/multivehicle_sim cd ../examples/multivehicle ./build.bash -./run.bash multivehicle_examples:humble +./run.bash multivehicle_examples:jazzy ``` Inside the container: diff --git a/multivehicle/build.bash b/multivehicle/build.bash index 049eb12..5e86930 100755 --- a/multivehicle/build.bash +++ b/multivehicle/build.bash @@ -3,15 +3,15 @@ set -e image_name=multivehicle_examples -image_tag=humble +image_tag=jazzy if [ ! -f "docker/Dockerfile" ]; then echo "Err: docker/Dockerfile not found. Run from src/examples/multivehicle." exit 1 fi -if ! docker image inspect multivehicle_sim:humble >/dev/null 2>&1; then - echo "Err: base image multivehicle_sim:humble not found." +if ! docker image inspect multivehicle_sim:jazzy >/dev/null 2>&1; then + echo "Err: base image multivehicle_sim:jazzy not found." echo "Build it first from src/multivehicle_sim." exit 1 fi diff --git a/multivehicle/docker/Dockerfile b/multivehicle/docker/Dockerfile index dce6149..021ffb8 100644 --- a/multivehicle/docker/Dockerfile +++ b/multivehicle/docker/Dockerfile @@ -1,20 +1,20 @@ -FROM multivehicle_sim:humble +FROM multivehicle_sim:jazzy SHELL ["/bin/bash", "-o", "pipefail", "-o", "errexit", "-c"] ENV DEBIAN_FRONTEND=noninteractive ARG HOME_DIR=/root RUN apt-get update && apt-get install -y --no-install-recommends \ - ros-humble-navigation2 \ - ros-humble-nav2-bringup \ - ros-humble-py-trees \ - ros-humble-py-trees-ros \ - ros-humble-tf-transformations && \ + python3-transforms3d \ + ros-jazzy-navigation2 \ + ros-jazzy-nav2-bringup \ + ros-jazzy-py-trees \ + ros-jazzy-py-trees-ros \ + ros-jazzy-tf-transformations && \ apt-get autoremove -y && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -RUN pip3 install --no-cache-dir --ignore-installed "transforms3d>=0.4" "numpy>=1.25,<2" -RUN pip3 install --no-cache-dir mavsdk +RUN pip3 install --no-cache-dir --break-system-packages mavsdk WORKDIR ${HOME_DIR} diff --git a/multivehicle/examples.repos b/multivehicle/examples.repos index 043495b..9ca4b92 100644 --- a/multivehicle/examples.repos +++ b/multivehicle/examples.repos @@ -11,12 +11,16 @@ repositories: Micro-XRCE-DDS-Agent: type: git url: https://github.com/eProsima/Micro-XRCE-DDS-Agent.git - version: v2.4.2 + version: v2.4.3 depth: 1 gz_led_plugin: type: git url: https://github.com/BumblebeeAS/bb_led_plugin.git version: main + vehicular_distance_plugin: + type: git + url: https://github.com/BumblebeeAS/vehicular_distance_plugin.git + version: master bb_robotx_dashboard: type: git url: https://github.com/BumblebeeAS/bb_robotx_dashboard.git diff --git a/multivehicle/run.bash b/multivehicle/run.bash index d12707d..46840d8 100755 --- a/multivehicle/run.bash +++ b/multivehicle/run.bash @@ -2,7 +2,7 @@ set -e -IMAGE_NAME="${1:-multivehicle_examples:humble}" +IMAGE_NAME="${1:-multivehicle_examples:jazzy}" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" WORKSPACE_DIR="$(cd "${SCRIPT_DIR}/../../.." && pwd)" diff --git a/multivehicle/tmuxp/mvsim_debug.yaml b/multivehicle/tmuxp/mvsim_debug.yaml index 544acb8..a7df87a 100644 --- a/multivehicle/tmuxp/mvsim_debug.yaml +++ b/multivehicle/tmuxp/mvsim_debug.yaml @@ -12,6 +12,11 @@ # 4) drone — XRCE agent + PX4 SITL x500 + gz bridge + offboard demo BT # 5) dashboard — web backend (:8080) + sim-side LED/incident bridges # 6) debug — free shell + Foxglove bridge +# +# Workspace dir defaults to /root/HOST/mvsim_ws and the PX4 SITL install root to +# /root/px4 (the image exports PX4_DIR). Override either by exporting it before +# loading, e.g.: +# WS_DIR=/root/HOST/my_ws tmuxp load .../mvsim_debug.yaml session_name: mvsim @@ -21,11 +26,14 @@ global_options: shell_command_before: - 'WS_DIR="${WS_DIR:-/root/HOST/mvsim_ws}"' + # PX4 SITL install root; exported by the image, defaulted here so the session + # still works on an older image that predates the ENV. + - 'PX4_DIR="${PX4_DIR:-/root/px4}"' # NVIDIA PRIME render offload — auto-enabled when an NVIDIA GPU is passed through # (rocker --nvidia mounts /dev/nvidia0). Harmless / skipped on non-NVIDIA hosts. - '[ -e /dev/nvidia0 ] && export __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia || true' - - source /opt/ros/humble/setup.bash - - '[ -f "$WS_DIR/install/setup.bash" ] && source "$WS_DIR/install/setup.bash"' + - source /opt/ros/jazzy/setup.bash + - 'if [ -f "$WS_DIR/install/setup.bash" ]; then source "$WS_DIR/install/setup.bash"; else echo "WARNING: $WS_DIR/install/setup.bash not found - build first: colcon build --symlink-install"; fi' - cd "$WS_DIR" windows: @@ -67,7 +75,7 @@ windows: - cmd: MicroXRCEAgent udp4 -p 8888 enter: false - shell_command: - - cmd: PX4_GZ_STANDALONE=1 PX4_SYS_AUTOSTART=4010 PX4_UXRCE_DDS_NS=x500 PX4_PARAM_UXRCE_DDS_SYNCT=0 PX4_GZ_MODEL_POSE="47.40,-388.95,3.85,0,0.0" /root/px4/px4_sitl/bin/px4 -w /root/px4/px4_sitl/romfs -i 1 + - cmd: PX4_GZ_STANDALONE=1 PX4_SYS_AUTOSTART=4010 PX4_UXRCE_DDS_NS=x500 PX4_PARAM_UXRCE_DDS_SYNCT=0 PX4_GZ_MODEL_POSE="47.40,-388.95,3.85,0,0.0" ${PX4_DIR}/px4_sitl/bin/px4 -w ${PX4_DIR}/px4_sitl/romfs -i 1 enter: false - shell_command: - cmd: ros2 launch multivehicle_sim uav_gz.launch.py model_name:=x500_mono_cam_1 @@ -87,7 +95,7 @@ windows: - cmd: ros2 launch bb_robotx_dashboard dashboard.launch.py enter: false - shell_command: - - cmd: ros2 launch bb_robotx_dashboard robotx_2026_sim.launch.py bridges_pkg:=multivehicle_sim models_pkg:=bb_worlds auv_name:=bluerov auv_pose_topic:=/bluerov/odom asv_name:=blueboat asv_pose_topic:=/blueboat/odom uav_name:=x500 uav_pose_topic:=/x500/odom + - cmd: ros2 launch bb_robotx_dashboard robotx_2026_sim.launch.py bridges_pkg:=robotx_gz models_pkg:=bb_worlds auv_name:=bluerov auv_pose_topic:=/bluerov/odom asv_name:=blueboat asv_pose_topic:=/blueboat/odom uav_name:=x500 uav_pose_topic:=/x500/odom enter: false # 6. Debug