Skip to content

Getting Started

Prerequisites

  • Docker and Docker Compose v2+
  • Git with submodule support
  • Ubuntu 22.04 or later (recommended)
  • For camera: Lucid Vision Triton camera with GigE Ethernet
  • For LiDAR: Ouster OS-series sensor on Ethernet
  • For vehicle: CAN interface (can0) wired to the StreetDrone Twizy XCU

1 — Clone the repository

git clone https://github.com/AIR-UFG/air_twizy_hardware.git
cd air_twizy_hardware
git submodule update --init --recursive

ArenaSDK (camera only)

The Lucid camera submodule requires the ArenaSDK and arena_api files to be placed manually before building:

  • ArenaSDK_Linux_x64.tar.gzworkspace/camera-lucid/resources/ArenaSDK/linux64/
  • arena_api-*.whlworkspace/camera-lucid/resources/arena_api/

Download both from the Lucid downloads hub.

2 — Configure environment variables

cp env.exemple .env

Edit .env with your machine-specific values. At minimum:

Variable Description Example
CAMERA_SERIAL Lucid camera serial number 12345678
ROS_DOMAIN_ID Shared ROS2 domain (must match all machines) 0
TWIZY_CAN_PORT Host CAN interface name can0

See Configuration for the full variable reference.

3 — Build Docker images

# Build all three services
docker compose build

# Or build individually
docker compose build camera
docker compose build lidar
docker compose build carro

4 — Hardware setup

# Tune the GigE interface (MTU, receive buffers, ring)
sudo ./workspace/camera-lucid/scripts/setup_network.sh <gige-interface>

# Assign a link-local IP to the interface
sudo ip addr add 169.254.1.1/16 dev <gige-interface>

# Allow containers to open graphical windows
xhost +local:docker

Connect the Ouster sensor to the host via Ethernet. The sensor auto-assigns a link-local IP by default. Use avahi-resolve -n <hostname>.local or check your DHCP server to find its IP before launching.

Bring up the CAN interface before starting the container:

sudo ip link set can0 type can bitrate 500000
sudo ip link set can0 up

5 — Start the services

# Start everything
docker compose up -d

# Or start a specific service
docker compose up -d camera
docker compose up -d lidar
docker compose up -d carro

6 — Open an interactive shell

docker compose exec camera bash
docker compose exec lidar bash
docker compose exec carro bash

Stopping services

docker compose down