Skip to main content

How to Install Project Aria Tools for C++

Overview

This page provides instructions on how to:

  • Build projectaria_tools for C++, without visualization
  • Build projectaria_tools for C++, with visualization
    • To install dependencies, follow the instructions for build without visualization first
  • Build projectaria_tools in isolation with a package manager (Linux/MacOs/Windows)
    • Most convenient way to check that code and unit test are running when performing Contribution/GitHub PR to the project

Build from source without visualization

Step 1 : Install dependencies

# Install build essentials
sudo apt install build-essential git cmake

# Install VRS/Pangolin dependencies
sudo apt install libgtest-dev libgmock-dev libgoogle-glog-dev libfmt-dev \
liblz4-dev libzstd-dev libxxhash-dev libboost-all-dev libpng-dev \
libjpeg-turbo8-dev libturbojpeg0-dev libglew-dev libgl1-mesa-dev libeigen3-dev

Step 2 : Compile C++ source code

cd $HOME/Documents/projectaria_sandbox

mkdir -p build && cd build

# compile the C++ API
cmake ../projectaria_tools/

make -j2

Build from source with visualization

Step 1 : Install dependencies

Follow the above steps to install dependencies build from source

Step 2 : Compile Pangolin

The viewers are built using Pangolin.

# compile & install Pangolin
cd /tmp

git clone --recursive https://github.com/stevenlovegrove/Pangolin.git

mkdir -p Pangolin_Build && cd Pangolin_Build

cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TOOLS=OFF -DBUILD_PANGOLIN_PYTHON=OFF \
-DBUILD_EXAMPLES=OFF ../Pangolin/

make -j2

sudo make install

Step 3 : Build projectaria_tools with visualization

cd $HOME/Documents/projectaria_sandbox

mkdir -p build && cd build

# Build C++ Aria Viewer
cmake ../projectaria_tools -DPROJECTARIA_TOOLS_BUILD_TOOLS=ON

make -j2

Step 4 : Verify installation by running the viewer

cd $HOME/Documents/projectaria_sandbox/build

# Running the Aria Viewer with default example data
./tools/visualization/aria_viewer \
--vrs ../projectaria_tools/data/mps_sample/sample.vrs

Build projectaria_tools in isolation with a package manager

You can build projectaria_tools in isolation using pixi on and for your local platform (Linux, macOS Intel/Silicon, Windows) using the exact same command lines. Pixi is a convenient package and environment manager that simplifies the logic to compile and run projects by defining dependencies and tasks in a single pixi.toml file for all platforms.

note

For Windows platform we assume that Microsoft Visual C++ Compiler, MSVC 2017 or 2022 has been installed.

Step1 Install Pixi

# Install Pixi
curl -fsSL https://pixi.sh/install.sh | bash

Step2 Compile and test the code

# When this command line first run, it will collect required dependencies, and then trigger the build and unit test
pixi run run_c

Step3 Access the compiled artifacts

# Activate the environment
pixi shell
# You can now run and use things from the projects

Troubleshooting

Check the Troubleshooting Guide if you encounter any issues.