Docker Images - Forestry-Robotics-UC/fruc_dataset_apparatus GitHub Wiki

Overview

The FRUC Dataset Apparatus uses containerized ROS2 (Jazzy) services for modular sensor integration and data recording. Each sensor has its own dedicated Docker image for isolation and easy deployment.

System Architecture

The docker-compose.yml file orchestrates multiple ROS2 containers that communicate over a shared network:

  • realsense: Intel Realsense D435i depth camera driver (hardware time-synced via RPi Pico)
  • xsens: Xsens IMU sensor driver (hardware time-synced via RPi Pico)
  • ouster: Ouster LiDAR driver (hardware time-synced via RPi Pico)
  • emlid: Emlid GNSS receiver driver
  • recording: Records selected ROS2 topics to rosbag files
  • publisher: Publishes robot descriptions and static transforms
  • foxglove-bridge: Visualization server for real-time data monitoring

The Raspberry Pi Pico time synchronization board ensures synchronized timestamps across the Xsens, Realsense, and Ouster sensors by providing a common reference clock signal to each device.

All containers use the ros:jazzy-ros-base image as their foundation and build upon it with sensor-specific dependencies.

Base Images and Common Setup

All sensor containers share the following base configuration:

  • Base Image: ros:jazzy-ros-base
  • OS: Ubuntu 22.04
  • ROS Distribution: ROS2 Jazzy
  • Build System: colcon (ROS2 build tool)

Common dependencies include:

  • build-essential and development tools
  • python3 and python3-pip
  • ROS2 development packages
  • Sensor-specific libraries (installed per container)

Individual Sensor Containers

Realsense Container (Dockerfile.realsense)

Purpose: Intel Realsense D435i depth camera integration

Hardware Time Synchronization: Connected to RPi Pico time sync board via GPIO/UART for synchronized timestamps

Key Dependencies:

  • librealsense2 (Intel RealSense SDK)
  • ros-jazzy-cv-bridge
  • ros-jazzy-image-transport
  • ros-jazzy-diagnostic-updater
  • ros-jazzy-sensor-msgs

Published Topics:

  • /camera/color/image_raw - RGB color stream (hardware time-synced)
  • /camera/color/camera_info - Color camera calibration
  • /camera/aligned_depth_to_color/image_raw - Aligned depth data (hardware time-synced)
  • /camera/aligned_depth_to_color/camera_info - Depth camera calibration
  • /camera/color/metadata - Frame metadata

Xsens Container (Dockerfile.xsens)

Purpose: Xsens MTi IMU sensor integration

Hardware Time Synchronization: Connected to RPi Pico time sync board via GPIO/UART for synchronized timestamps

Key Dependencies:

  • Xsens ROS2 driver packages
  • Serial communication libraries

Published Topics:

  • /imu/data - IMU accelerometer and gyroscope data (hardware time-synced)
  • /imu/mag - Magnetometer data (hardware time-synced)
  • /heading - Computed heading angles

Device Access: Requires /dev/ttyUSB0 for serial communication

Ouster Container (Dockerfile.ouster)

Purpose: Ouster LiDAR sensor integration

Hardware Time Synchronization: Connected to RPi Pico time sync board via GPIO/UART for synchronized timestamps

Key Dependencies:

  • Ouster ROS2 driver
  • Point cloud processing libraries

Published Topics:

  • /ouster/lidar_packets - Raw LiDAR packets (hardware time-synced)
  • /ouster/imu_packets - LiDAR internal IMU packets (hardware time-synced)
  • /ouster/metadata - LiDAR configuration and metadata
  • /ouster/points - Processed point cloud (if enabled)

Network Ports: UDP ports 7502 and 7503 for LiDAR communication

Emlid Container (Dockerfile.emlid)

Purpose: Emlid GNSS receiver integration for position fixes

Key Dependencies:

  • NMEA saturation driver package
  • Serial communication libraries

Published Topics:

  • /fix - GPS/GNSS position fix data

Device Access: Requires /dev/ttyACM1 for serial communication

Recording Container (Dockerfile.recording)

Purpose: Records selected topics to rosbag2 files

Key Dependencies:

  • ROS2 rosbag2 tools
  • Python scripting support for custom recording logic

Functionality:

  • Subscribes to selected topics based on launch parameters
  • Records data with compression
  • Saves files to /rosbags volume mount

Publisher Container (Dockerfile.publisher)

Purpose: Publishes robot description and static transforms

Key Dependencies:

  • ros-jazzy-robot-state-publisher
  • ros-jazzy-joint-state-publisher

Published Topics:

  • /robot_description - URDF model of the apparatus
  • /tf_static - Static transform frames

Network Configuration

Containers communicate via two Docker networks defined in docker-compose.yml:

  1. ros2-net (internal): Main ROS2 communication network
  2. link-local-net (external): For devices requiring external network access

Building Images

Images are built on-the-fly during docker-compose up or can be manually built:

cd docker
docker build -f Dockerfile.realsense -t ros2-apparatus-realsense:jazzy .
docker build -f Dockerfile.xsens -t ros2-apparatus-xsens:jazzy .