Fixposition SDK 0.0.0-heads/main-0-g75e6614
Collection of c++ libraries and apps for use with Fixposition products on Linux
Loading...
Searching...
No Matches
Fixposition SDK: Build and installation

Overview

This page describes how the Fixposition SDK can be built and installed. This is intended for users who are familiar with developing c++ code and building software and who want to build their own applications using the Fixposition SDK: Common Library.

For users interested in simply using the Fixposition SDK: Apps it is recommended to use the Fixposition SDK: Running pre-built apps instead of building and installing those themselves.

Dependencies

The Fixposition SDK is made for Linux. To build it a GCC (C++-17) toolchain is required. You may have some luck using clang, but you're on your own there. Besides a glibc and standard Linux tools, such as CMake, make, bash, xxd, sed, awk, etc. are required to build. This is tested and known to work with Ubuntu 20.04, 22.04, 24.04 and 26.04, as well as Debian Trixie.

For building the libraries and apps the following dependencies are used. Some are required and some are optional.

Dependency Version Required CMake (1) Optional use
boost ≥ 1.71.0 required
BZip2 ≥ 1.0.8 optional FPSDK_USE_BZ2 fpsdk::common::ros1::BagWriter
curl ≥ 7.68.0 required
Eigen3 ≥ 3.3.7 required
yaml-cpp ≥ 0.6.2 required
zlib1g ≥ 1.2.11 required
OpenSSL (libssl) ≥ 1.1.x required
nlohmann-json3 ≥ 3.7.3 required
PROJ ≥ 9.4.x optional FPSDK_USE_PROJ fpsdk::common::trafo::Transformer
FFmpeg (2) = 7.1.x optional FPSDK_USE_FFMPEG fpsdk::common::video, .fpl tool
ROS1 (3) Noetic optional fpsdk::common::ros1
ROS2 (3) Humble, Jazzy or Lyrical optional fpsdk::common::ros2, .fpl tool
clang-format (4) ≥ 19 optional for development
Doxygen (4) ≥ 1.14.0 optional for development
GTest (4) ≥ 1.13.0 optional FPSDK_BUILD_TESTING for development

(1) These CMake arguments are available to control these dependencies. By default the dependency is automatically used when a suitable library is found. To explicitly enable or disable the use of such a dependency one can set the CMake argument accordingly. For example: -DFPSDK_USE_PROJ=OFF to disable the use of the PROJ library or -DFPSDK_USE_PROJ=ON to required the use of the PROJ library. See also Manual build below.

(2) The FFmpeg libraries must be configured with –disable-gpl and –disable-nonfree in order to comply with the Fixposition SDK license. The CMake tests for that and refuses to use non-free/gpl builds of the FFmpeg libraries.

(3) ROS support is optional, and it's either ROS1 or ROS2. To enable, build in a ROS environment using catkin resp. colcon and the availability of ROS is detected automatically.

(4) These are only needed for development. That is, they are not required for building the Fixposition SDK: Common Library and Fixposition SDK: Apps.

See Dependency versions for the versions used in the CI builds.

Building

tl;dr

./docker/docker.sh pull trixie-dev # Or "docker.sh build trixie-dev" to build the image locally
./docker/docker.sh run trixie-dev bash
# Now inside Docker do:
make install
./fpsdk/bin/fpltool -h

VSCode devcontainer

Open the fpsdk.code-workspace, change to one of the provided devcontainers (recommended: trixie), and in a terminal do:

make install
./fpsdk/bin/fpltool

Docker container

Docker images are provided that include all the dependencies:

./docker/docker.sh pull trixie-dev # Or "docker.sh build trixie-dev" to build the image locally
./docker/docker.sh run trixie-dev bash
make install
./fpsdk/bin/fpltool

Note that for the containers with ROS (Noetic, Lyrical, etc.) you'll have to source the ROS stuff. For example:

./docker/docker.sh pull noetic-dev # Or "docker.sh build noetic-dev" to build the image locally
./docker/docker.sh run noetic-dev bash
. /opt/ros/noetic/setup.bash
make install
./fpsdk/bin/fpltool

Run CI

./docker/docker.sh run trixie-ci ./docker/ci.sh
./docker/docker.sh run noetic-ci ./docker/ci.sh
./docker/docker.sh run humble-ci ./docker/ci.sh
./docker/docker.sh run jazzy-ci ./docker/ci.sh
./docker/docker.sh run lyrical-ci ./docker/ci.sh

Manual build

This details the manual setup of the dependencies and building the SDK on a ROS1 system (for example, Ubuntu 20.04 with ROS Noetic). It works similarly for ROS2 (for example, Ubuntu 22.04 with ROS Humble) or non-ROS (for example, Debian Trixie) based systems. Refer to the Docker configration files and scripts in the docker/ folder on installing the required dependencies.

  1. Setup build system, install dependencies

    The exact steps required depend on your system. You'll need the dependencies mentioned above installed system wide or otherwise tell CMake where to find them. Refer to the provided Docker configuration and helper scripts, namely "install_apt_base.sh", to check which packages can be installed in Ubuntu or Debian.

    Something like this should work:

    sudo apt install libyaml-cpp-dev libboost-all-dev zlib1g-dev libeigen3-dev linux-libc-dev xxd # For building
    sudo apt install libgtest-dev clang-format doxygen pre-commit # For development
    source /opt/ros/lyrical/setup.bash # If you have ROS2 Lyrical
  2. Configure

    cmake -B build -DCMAKE_INSTALL_PREFIX=~/fpsdk

    Additional parameters, such as -DFPSDK_USE_PROJ=OFF, can be given. See Dependencies above.

    The build type can be selected by -DCMAKE_BUILD_TYPE=Debug or -DCMAKE_BUILD_TYPE=Release (default). Add -DCMAKE_PREFIX_PATH=... to hint at non-standard installation paths, such as /path/to/ffmpeg-lgpl.

  3. Build

    cmake --build build
  4. Install

    cmake --install build
  5. Enjoy!

    For example:

    ~/fpsdk/bin/fpltool -h

Documentation

make doc

Individual packages

For example to build the fpsdk_common package (library):

cmake -B build -S fpsdk_common -DCMAKE_INSTALL_PREFIX=~/fpsdk
cmake --build build
cmake --install build

ROS workspace

The packages build in a ROS workspace using catkin (ROS1) resp. colcon (ROS2). For example:

catkin build fpsdk_common

Note that if you clone this repository directly to your ros_workspace/src directory, you may have to place CATKIN_IGNORE resp. COLCON_IGNORE files in some places. For example:

# ROS1 catkin workspace
touch src/fixposition-sdk/examples/CATKIN_IGNORE # Ignore all examples, or
touch src/fixposition-sdk/examples/parser_intro/CATKIN_IGNORE # Ignore only this example
# ROS2 colcon workspace
touch src/fixposition-sdk/examples/COLCON_IGNORE # Ignore all examples, or
touch src/fixposition-sdk/examples/parser_intro/COLCON_IGNORE # Ignore only this example

Details

Refer to the various CMakeList.txt files, the CI workflow configuration (.github/workflows/ci.yml) and the CI script (docker/ci.sh) for details on how things are done.

Dependency versions

The builds using Debian 13 "Trixie" currently use:

# Versions for fpsdk_common
BZIP2 1.0.8
Boost 1.83.0
CMAKE 3.31.6
Eigen3 3.4.0
OpenSSL 3.5.6
PROJ 9.6.0
ZLIB 1.3.1
libavcodec 61.19.101
libavfilter 10.5.100
libavutil 59.39.100
libswscale 8.3.100
nlohmann_json 3.11.3
yaml-cpp 0.8.0

The builds using ROS Noetic (Ubuntu 20.04.6 LTS "Focal") currently use:

# Versions for fpsdk_common
BZIP2
Boost 1.71.0
CMAKE 3.16.3
Eigen3 3.3.7
OpenSSL 1.1.1f
PROJ 9.4.1
ZLIB
libavcodec 61.19.101
libavfilter 10.5.100
libavutil 59.39.100
libswscale 8.3.100
nlohmann_json 3.7.3
yaml-cpp 0.6.2

The builds using ROS Humble (Ubuntu 22.04 LTS "Jammy") currently use:

# Versions for fpsdk_common
BZIP2
Boost 1.74.0
CMAKE 3.22.1
Eigen3 3.4.0
OpenSSL 3.0.2
PROJ 9.4.1
ZLIB
libavcodec 61.19.101
libavfilter 10.5.100
libavutil 59.39.100
libswscale 8.3.100
nlohmann_json 3.10.5
yaml-cpp 0.7.0

The builds using ROS Jazzy (Ubuntu 24.04 LTS "Noble") currently use:

# Versions for fpsdk_common
BZIP2 1.0.8
Boost 1.83.0
CMAKE 3.28.3
Eigen3 3.4.0
OpenSSL 3.0.13
PROJ 9.4.0
ZLIB 1.3
libavcodec 61.19.101
libavfilter 10.5.100
libavutil 59.39.100
libswscale 8.3.100
nlohmann_json 3.11.3
yaml-cpp 0.8.0

The builds using ROS Lyrical (Ubuntu 26.04 LTS "Raccoon") currently use:

# Versions for fpsdk_common
BZIP2 1.0.8
Boost 1.90.0
CMAKE 4.2.3
Eigen3 3.4.0
OpenSSL 3.5.5
PROJ 9.7.1
ZLIB 1.3.1
libavcodec 61.19.101
libavfilter 10.5.100
libavutil 59.39.100
libswscale 8.3.100
nlohmann_json 3.11.3
yaml-cpp 0.8.0