Installation

OS Support

Currently, Titan Processing only supports Linux builds for AArch64 and x86_64 with no plans to support Windows or MacOS, but feel free to try. All package requirements should be cross-platform. There are issues with configuring CMake using Visual Studio solutions and building with MSVC so consider using MinGW or Clang.

Building

Instructions

  1. Install OpenCV 4.8.x or above with the Aruco contrib module. Python 3.8.x or above support is optional but necessary to run calibration scripts. Follow the official guide to build OpenCV contrib here, but only the ArUco submodule is used.

  2. (Optional) Install Intel RealSense SDK to build RealSense modules.

  3. Install GoogleTest testing framework.

  4. Install JSON for Modern C++ using vcpkg or build it from scratch. To install vcpkg with our own Debian binaries, execute the following.

# Install vcpkg binary (optional)
curl -OL https://github.com/ethanc8/titanian-repo/raw/master/debian/pool/main/v/vcpkg/vcpkg_2023.12.10-2+titan2022_amd64.deb
sudo apt install ./vcpkg_2023.12.10-2+titan2022_amd64.deb

# Install nlohmann json library using vcpkg
vcpkg install nlohmann-json
  1. Configure the CMake script using Makefile or Ninja (both build systems supported) using the following commands. Link vcpkg toolchain file to include vcpkg packages or alternatively link nlohmann-json manually.

mkdir build && cd build

# Config to build examples
cmake -B . -S .. -DCMAKE_TOOLCHAIN_FILE=[PATH TO VCPKG]/scripts/buildsystems/vcpkg.cmake -DBUILD_EXAMPLES=1

# Full debug config
# - forces CMake to use Ninja
# - allows for Clangd usage
cmake -B . -S .. -DCMAKE_TOOLCHAIN_FILE=[PATH TO VCPKG]/scripts/buildsystems/vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DBUILD_EXAMPLES=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja

# Production config
cmake -B . -S .. -DCMAKE_TOOLCHAIN_FILE=[PATH TO VCPKG]/scripts/buildsystems/vcpkg.cmake -DBUILD_EXAMPLES=1
  1. Build and install the project using your build system.

# For Makefile
make -j
sudo make install

# For Ninja
ninja
sudo ninja install

Build Options

  • -DBUILD_EXAMPLES: builds example files (found in example directory)

  • -DNO_REALSENSE: builds without RealSense code for compatibility

Configuration

Edit the config inside config.json of your project or inside the example directory.

  • ip, port: UDP server IP/port

  • threads: threads per camera stream

  • quadDecimate: n/a

  • quadSigma: n/a

  • decodeSharpening: n/a

  • cameras

    • name: keyword that will be matched when selecting camera stream

    • width, height, fps, exposure: stream parameters (Camset is helpful)

    • Everything else is generated by calibration.py

  • apriltags

    • id: id

    • position: field position in meters

    • rotation: field rotation in degrees

    • size: Apriltag size in meters

Other Tools

  • Camset

    • Quick way to calibrate camera parameters like exposure

  • calibration.py

    • Calibrating camera matrix and distortion coefficients

    • Use ChArUco board generator and print it

    • Take pictures with [space] (best to try multiple angles, 20+ photos)

  • Java networking server example

    • UDP server for networking values

    • All types implimented