Fixposition SDK
0.0.0-heads/main-0-g4d935a0
Collection of c++ libraries and apps for use with Fixposition products on Linux
Loading...
Searching...
No Matches
fpsdk_build.hpp
Go to the documentation of this file.
1
/**
2
* \verbatim
3
* ___ ___
4
* \ \ / /
5
* \ \/ / Copyright (c) Fixposition AG (www.fixposition.com) and contributors
6
* / /\ \ License: see the LICENSE file
7
* /__/ \__\
8
* \endverbatim
9
*
10
* @file
11
* @brief Fixposition SDK: Documentation
12
*/
13
14
#ifndef __FPSDK_BUILD_HPP__
15
#define __FPSDK_BUILD_HPP__
16
17
namespace
fpsdk
{
18
/* ****************************************************************************************************************** */
19
// clang-format off
20
21
/*!
22
23
@page FPSDK_BUILD_DOC Fixposition SDK: Build and installation
24
25
@section FPSDK_BUILD_DOC_OVERVIEW Overview
26
27
This page describes how the Fixposition SDK can be built and installed. This is intended for users who are familiar
28
with developing c++ code and building software and who want to build their own applications using the @ref
29
FPSDK_COMMON_DOC (etc.)
30
31
For users interested in simply *using* the @ref FPSDK_APPS_DOC it is recommended to use the @ref FPSDK_RUN_DOC
32
instead of building and installing those themselves.
33
34
35
@section FPSDK_BUILD_DEPS Dependencies
36
37
For building the libraries and apps:
38
39
- **Linux**, **GCC** (C++-17), glibc, cmake, bash, etc. (tested with Ubuntu 20.04/22.04/24.04 and Debian Trixie)
40
- boost (≥ 1.71.0)
41
- curl (≥ 7.68.0)
42
- Eigen3 (≥ 3.3.7)
43
- yaml-cpp (≥ 0.6.2)
44
- zlib1g (≥ 1.2.11)
45
- OpenSSL (libssl) (≥ 1.1.x)
46
- nlohmann-json3 (≥ 3.7.3)
47
- Various Linux tools, including Bash, CMake, make, xxd, sed, awk, ...
48
- PROJ (*) (≥ 9.4.x)
49
- FFmpeg (libavcodec, libavutil, ...) (**) (= 7.1.x)
50
- ROS1 (*) (Noetic), or
51
- ROS2 (*) (Humble, Jazzy or Lyrical)
52
53
(*) Optional dependencies. Without these some functionality in the libraries and apps is unavailable (compiled out).
54
55
(**) Optional. The FFmpeg libraries must be configured with --disable-gpl and --disable-nonfree in order to comply
56
with the Fixposition SDK license. See *Configure* below for related build configuration options.
57
58
For development additionally:
59
60
- clang-format (≥ 19, tested with 19)
61
- Doxygen (≥ 1.11.0, tested with 1.14.0)
62
- GTest (≥ 1.13.0)
63
64
See @ref FPSDK_BUILD_CIVERSIONS for the versions used in the CI builds.
65
66
<!-- trick doxygen -->
67
68
@page FPSDK_BUILD_DOC
69
70
@section FPSDK_BUILD_BUILD Building
71
72
@subsection FPSDK_BUILD_BUILD_TLDR tl;dr
73
74
@code{sh}
75
./docker/docker.sh pull noetic-dev # Or "docker.sh build noetic-dev" to build the image locally
76
./docker/docker.sh run noetic-dev bash
77
# Now inside Docker do:
78
source /opt/ros/noetic/setup.bash
79
make install
80
./fpsdk/bin/fpltool -h
81
@endcode
82
83
<!-- trick doxygen -->
84
85
@subsection FPSDK_BUILD_BUILD_DEVCONTAINER VSCode devcontainer
86
87
Open the fpsdk.code-workspace, change to one of the provided devcontainers, and in a terminal do:
88
89
@code{sh}
90
make install
91
./fpsdk/bin/fpltool
92
@endcode
93
94
<!-- trick doxygen -->
95
96
@subsection FPSDK_BUILD_BUILD_DOCKER Docker container
97
98
Docker images are provided that include all the dependencies:
99
100
@code{sh}
101
./docker/docker.sh pull noetic-dev # Or "docker.sh build noetic-dev" to build the image locally
102
./docker/docker.sh run noetic-dev bash
103
source /opt/ros/noetic/setup.bash
104
make install
105
./fpsdk/bin/fpltool
106
@endcode
107
108
Note that the "docker.sh" script does not give you a suitable ROS runtime (or development, playground, ...)
109
environment! Its only purpose is to run the CI for this repo and to demonstrate the building here. For a ROS
110
run-time environment please setup a docker *container* yourself elsewhere (perhaps using the docker *image* provided
111
here). See ROS and Docker documentation and the Internet for help.
112
113
<!-- trick doxygen -->
114
115
@subsection FPSDK_BUILD_BUILD_CI Run CI
116
117
@code{sh}
118
./docker/docker.sh run noetic-ci ./docker/ci.sh
119
./docker/docker.sh run humble-ci ./docker/ci.sh
120
./docker/docker.sh run jazzy-ci ./docker/ci.sh
121
./docker/docker.sh run lyrical-ci ./docker/ci.sh
122
@endcode
123
124
<!-- trick doxygen -->
125
126
@subsection FPSDK_BUILD_BUILD_MANUAL Manual build
127
128
This details the manual setup of the dependencies and building the SDK on a ROS1 system (for example, Ubuntu 20.04
129
with ROS Noetic). It works similarly for ROS2 (for example, Ubuntu 22.04 with ROS Humble) or non-ROS (for example,
130
Debian Trixie) based systems. Refer to the Docker configration files and scripts in the docker/ folder on installing
131
the required dependencies.
132
133
1. Setup build system, install dependencies
134
135
The exact steps required depend on your system. You'll need the dependencies mentioned above installed system
136
wide or otherwise tell CMake where to find them.
137
138
@code{sh}
139
sudo apt install libyaml-cpp-dev libboost-all-dev zlib1g-dev libeigen3-dev linux-libc-dev xxd # For building
140
sudo apt install libgtest-dev clang-format doxygen pre-commit # For development
141
source /opt/ros/noetic/setup.bash # If you have ROS1
142
@endcode
143
144
3. Configure
145
146
@code{sh}
147
cmake -B build -DCMAKE_INSTALL_PREFIX=~/fpsdk
148
@endcode
149
150
Additional parameters include (see CMakeList.txt files of the projects for details and more parameters):
151
152
- Build type: `-DCMAKE_BUILD_TYPE=Debug` or `-DCMAKE_BUILD_TYPE=Release` (default)
153
- Force ROS1 package path: `-DROS_PACKAGE_PATH=/path/to/ros` (default: auto-detect)
154
- Explicitly enable or disable testing: `-DFPSDK_BUILD_TESTING=ON` or `-DFPSDK_BUILD_TESTING=OFF`.
155
The default is to automatically enable testing if a suitable GTest library is found.
156
- Explicitly enable or disable use of the PROJ library: `-DFPSDK_USE_PROJ=ON` or `-DFPSDK_USE_PROJ=OFF`.
157
The default is to automatically use the PROJ library if a suitable version is found.
158
- Explicitly enable or disable use of the FFmpeg libraries: `-DFPSDK_USE_FFMPEG=ON` or `-DFPSDK_USE_FFMPEG=OFF`.
159
The default is to automatically use the FFmpeg libraries if suitable versions are found.
160
- Add `-DCMAKE_PREFIX_PATH=...` to hint at non-standard installation paths, such as `/path/to/ffmpeg-lgpl`.
161
162
4. Build
163
164
@code{sh}
165
cmake --build build
166
@endcode
167
168
5. Install
169
170
@code{sh}
171
cmake --install build
172
@endcode
173
174
6. Enjoy!
175
176
For example:
177
178
@code{sh}
179
~/fpsdk/bin/fpltool -h
180
@endcode
181
182
<!-- trick doxygen -->
183
184
@subsection FPSDK_BUILD_DOC_DOXYGEN Documentation
185
186
@code{sh}
187
make doc
188
@endcode
189
190
191
<!-- trick doxygen -->
192
193
@subsection FPSDK_BUILD_PACKAGE Individual packages
194
195
For example to build the fpsdk_common package (library):
196
197
@code{sh}
198
cmake -B build -S fpsdk_common -DCMAKE_INSTALL_PREFIX=~/fpsdk
199
cmake --build build
200
cmake --install build
201
@endcode
202
203
204
<!-- trick doxygen -->
205
206
@subsection FPSDK_BUILD_ROS ROS workspace
207
208
The packages build in a ROS workspace using catkin (ROS1) resp. colcon (ROS2). For example:
209
210
@code{sh}
211
catkin build fpsdk_common
212
@endcode
213
214
Note that if you clone this repository directly to your `ros_workspace/src` directory, you'll have to place
215
CATKIN_IGNORE resp. COLCON_IGNORE files in some places. For example:
216
217
@code{sh}
218
# ROS1 catkin workspace
219
touch src/fixposition-sdk/examples/CATKIN_IGNORE # Ignore all examples, or
220
touch src/fixposition-sdk/examples/ros1_fpsdk_demo/CATKIN_IGNORE # Ignore only this example
221
touch src/fixposition-sdk/fpsdk_ros2/CATKIN_IGNORE
222
@endcode
223
224
@code{sh}
225
# ROS2 colcon workspace
226
touch src/fixposition-sdk/examples/COLCON_IGNORE # Ignore all examples, or
227
touch src/fixposition-sdk/examples/ros2_fpsdk_demo/COLCON_IGNORE # Ignore only this example
228
touch src/fixposition-sdk/fpsdk_ros1/COLCON_IGNORE
229
@endcode
230
231
<!-- trick doxygen -->
232
233
@subsection FPSDK_BUILD_DETAILS Details
234
235
Refer to the various CMakeList.txt files, the CI workflow configuration (`.github/workflows/ci.yml`)
236
and the CI script (`docker/ci.sh`) for details on how things are done.
237
238
239
@section FPSDK_BUILD_CIVERSIONS Dependency versions
240
241
242
The builds using Debian 13 "Trixie" currently use:
243
244
@include fpsdk_common_versions_trixie/fpsdk_common/fpsdk_common_versions.txt
245
246
247
The builds using ROS Noetic (Ubuntu 20.04.6 LTS "Focal") currently use:
248
249
@include fpsdk_common_versions_noetic/fpsdk_common/fpsdk_common_versions.txt
250
251
252
The builds using ROS Humble (Ubuntu 22.04 LTS "Jammy") currently use:
253
254
@include fpsdk_common_versions_humble/fpsdk_common/fpsdk_common_versions.txt
255
256
257
The builds using ROS Jazzy (Ubuntu 24.04 LTS "Noble") currently use:
258
259
@include fpsdk_common_versions_jazzy/fpsdk_common/fpsdk_common_versions.txt
260
261
262
The builds using ROS Lyrical (Ubuntu 26.04 LTS "Raccoon") currently use:
263
264
@include fpsdk_common_versions_lyrical/fpsdk_common/fpsdk_common_versions.txt
265
*/
266
267
// clang-format on
268
/* ****************************************************************************************************************** */
269
}
// namespace fpsdk
270
#endif
// __FPSDK_BUILD_HPP__
fpsdk
Fixposition SDK.
Definition
fpsdk_build.hpp:17
fpsdk_doc
fpsdk_build.hpp
Generated on
for Fixposition SDK by
1.15.0