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

Dependencies

For building the libraries and apps:

  • Linux, GCC (C++-17), glibc, cmake, bash, etc. (tested with Ubuntu 20.04/22.04/24.04 and Debian Bookworm)
  • boost (≥ 1.71.0, tested with 1.71.0, 1.74.1, 1.83.0)
  • curl (≥ 7.68.0, tested with 7.68.0, 7.88.1, 8.5.0)
  • Eigen3 (≥ 3.3.7, tested with 3.3.7, 3.4.0)
  • yaml-cpp (≥ 0.6.2, tested with 0.6.2, 0.7.0, 0.8.0)
  • zlib1g (≥ 1.2.11, tested with 1.2.11, 1.2.13, 1.3)
  • PROJ (*) (≥ 9.4.x, tested with 9.4.0, 9.4.1)
  • ROS1 (*) (Noetic), or
  • ROS2 (*) (Humble or Jazzy)

(*) Optional dependencies. Without these some functionality in the libraries and apps is unavailable (compiled out).

For development additionally:

  • clang-format (≥ 17, tested with 17)
  • Doxygen (≥ 1.11.0, tested with 1.11.0)
  • GTest (≥ 1.12.0, tested with 1.12.1 and 1.13.0)

Building

tl;dr

./docker/docker.sh pull noetic-dev # Or "docker.sh build noetic-dev" to build the image locally
./docker/docker.sh run noetic-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, 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 noetic-dev # Or "docker.sh build noetic-dev" to build the image locally
./docker/docker.sh run noetic-dev bash
make install
./fpsdk/bin/fpltool

Run CI

./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

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 Bookworm) 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.

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

    cmake -B build -DCMAKE_INSTALL_PREFIX=~/fpsdk

    Additional parameters include (see CMakeList.txt files of the projects for details):

    • Build type: -DCMAKE_BUILD_TYPE=Debug or -DCMAKE_BUILD_TYPE=Release (default)
    • Force ROS1 package path: -DROS_PACKAGE_PATH=/path/to/ros (default: auto-detect)
    • Explicitly enable or disable testing: -DBUILD_TESTING=OFF or -DBUILD_TESTING=ON. The default is to automatically enable testing if a suitable GTest library is found.
    • Explicitly enable or disable use of the PROJ library: -DUSE_PROJ=ON or -DUSE_PROJ=OFF. The default is to automatically use the PROJ library if a suitable version is found
  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

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.