Fixposition SDK
0.0.0-heads/main-0-g4e80ed3
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 Bookworm)
40
- boost (≥ 1.71.0, tested with 1.71.0, 1.74.1, 1.83.0)
41
- curl (≥ 7.68.0, tested with 7.68.0, 7.88.1, 8.5.0)
42
- Eigen3 (≥ 3.3.7, tested with 3.3.7, 3.4.0)
43
- yaml-cpp (≥ 0.6.2, tested with 0.6.2, 0.7.0, 0.8.0)
44
- zlib1g (≥ 1.2.11, tested with 1.2.11, 1.2.13, 1.3)
45
- OpenSSL (libssl) (≥ 1.1.x, tested with 1.1.1, 3.0.2, 3.0.13, 3.0.15)
46
- nlohmann-json3 (≥ 3.7.3, tested with 3.7.3, 3.11.3)
47
- Various Linux tools, including Bash, CMake, make, xxd, sed, awk, ...
48
- PROJ (*) (≥ 9.4.x, tested with 9.4.0, 9.4.1)
49
- ROS1 (*) (Noetic), or
50
- ROS2 (*) (Humble or Jazzy)
51
52
(*) Optional dependencies. Without these some functionality in the libraries and apps is unavailable (compiled out).
53
54
For development additionally:
55
56
- clang-format (≥ 17, tested with 17)
57
- Doxygen (≥ 1.11.0, tested with 1.11.0)
58
- GTest (≥ 1.12.0, tested with 1.12.1 and 1.13.0)
59
60
<!-- trick doxygen -->
61
62
@page FPSDK_BUILD_DOC
63
64
@section FPSDK_BUILD_BUILD Building
65
66
@subsection FPSDK_BUILD_BUILD_TLDR tl;dr
67
68
@code{sh}
69
./docker/docker.sh pull noetic-dev # Or "docker.sh build noetic-dev" to build the image locally
70
./docker/docker.sh run noetic-dev bash
71
# Now inside Docker do:
72
source /opt/ros/noetic/setup.bash
73
make install
74
./fpsdk/bin/fpltool -h
75
@endcode
76
77
<!-- trick doxygen -->
78
79
@subsection FPSDK_BUILD_BUILD_DEVCONTAINER VSCode devcontainer
80
81
Open the fpsdk.code-workspace, change to one of the provided devcontainers, and in a terminal do:
82
83
@code{sh}
84
make install
85
./fpsdk/bin/fpltool
86
@endcode
87
88
<!-- trick doxygen -->
89
90
@subsection FPSDK_BUILD_BUILD_DOCKER Docker container
91
92
Docker images are provided that include all the dependencies:
93
94
@code{sh}
95
./docker/docker.sh pull noetic-dev # Or "docker.sh build noetic-dev" to build the image locally
96
./docker/docker.sh run noetic-dev bash
97
source /opt/ros/noetic/setup.bash
98
make install
99
./fpsdk/bin/fpltool
100
@endcode
101
102
Note that the "docker.sh" script does not give you a suitable ROS runtime (or development, playground, ...)
103
environment! Its only purpose is to run the CI for this repo and to demonstrate the building here. For a ROS
104
run-time environment please setup a docker *container* yourself elsewhere (perhaps using the docker *image* provided
105
here). See ROS and Docker documentation and the Internet for help.
106
107
<!-- trick doxygen -->
108
109
@subsection FPSDK_BUILD_BUILD_CI Run CI
110
111
@code{sh}
112
./docker/docker.sh run noetic-ci ./docker/ci.sh
113
./docker/docker.sh run humble-ci ./docker/ci.sh
114
./docker/docker.sh run jazzy-ci ./docker/ci.sh
115
@endcode
116
117
<!-- trick doxygen -->
118
119
@subsection FPSDK_BUILD_BUILD_MANUAL Manual build
120
121
This details the manual setup of the dependencies and building the SDK on a ROS1 system (for example, Ubuntu 20.04
122
with ROS Noetic). It works similarly for ROS2 (for example, Ubuntu 22.04 with ROS Humble) or non-ROS (for example,
123
Debian Bookworm) based systems. Refer to the Docker configration files and scripts in the docker/ folder on
124
installing the required dependencies.
125
126
1. Setup build system, install dependencies
127
128
The exact steps required depend on your system. You'll need the dependencies mentioned above installed system
129
wide or otherwise tell CMake where to find them.
130
131
@code{sh}
132
sudo apt install libyaml-cpp-dev libboost-all-dev zlib1g-dev libeigen3-dev linux-libc-dev xxd # For building
133
sudo apt install libgtest-dev clang-format doxygen pre-commit # For development
134
source /opt/ros/noetic/setup.bash # If you have ROS1
135
@endcode
136
137
3. Configure
138
139
@code{sh}
140
cmake -B build -DCMAKE_INSTALL_PREFIX=~/fpsdk
141
@endcode
142
143
Additional parameters include (see CMakeList.txt files of the projects for details and more parameters):
144
145
- Build type: `-DCMAKE_BUILD_TYPE=Debug` or `-DCMAKE_BUILD_TYPE=Release` (default)
146
- Force ROS1 package path: `-DROS_PACKAGE_PATH=/path/to/ros` (default: auto-detect)
147
- Explicitly enable or disable testing: `-DBUILD_TESTING=OFF` or `-DBUILD_TESTING=ON`.
148
The default is to automatically enable testing if a suitable GTest library is found.
149
Note that the instead of the standard BUILD_TESTING variable the variable `FPSDK_BUILD_TESTING=...`
150
can be used.
151
- Explicitly enable or disable use of the PROJ library: `-DFPSDK_USE_PROJ=ON` or `-DFPSDK_USE_PROJ=OFF`.
152
The default is to automatically use the PROJ library if a suitable version is found
153
154
4. Build
155
156
@code{sh}
157
cmake --build build
158
@endcode
159
160
5. Install
161
162
@code{sh}
163
cmake --install build
164
@endcode
165
166
6. Enjoy!
167
168
For example:
169
170
@code{sh}
171
~/fpsdk/bin/fpltool -h
172
@endcode
173
174
<!-- trick doxygen -->
175
176
@subsection FPSDK_BUILD_DOC_DOXYGEN Documentation
177
178
@code{sh}
179
make doc
180
@endcode
181
182
183
<!-- trick doxygen -->
184
185
@subsection FPSDK_BUILD_PACKAGE Individual packages
186
187
For example to build the fpsdk_common package (library):
188
189
@code{sh}
190
cmake -B build -S fpsdk_common -DCMAKE_INSTALL_PREFIX=~/fpsdk
191
cmake --build build
192
cmake --install build
193
@endcode
194
195
196
<!-- trick doxygen -->
197
198
@subsection FPSDK_BUILD_ROS ROS workspace
199
200
The packages build in a ROS workspace using catkin (ROS1) resp. colcon (ROS2). For example:
201
202
@code{sh}
203
catkin build fpsdk_common
204
@endcode
205
206
Note that if you clone this repository directly to your `ros_workspace/src` directory, you'll have to place
207
CATKIN_IGNORE resp. COLCON_IGNORE files in some places. For example:
208
209
@code{sh}
210
# ROS1 catkin workspace
211
touch src/fixposition-sdk/examples/CATKIN_IGNORE # Ignore all examples, or
212
touch src/fixposition-sdk/examples/ros1_fpsdk_demo/CATKIN_IGNORE # Ignore only this example
213
touch src/fixposition-sdk/fpsdk_ros2/CATKIN_IGNORE
214
@endcode
215
216
@code{sh}
217
# ROS2 colcon workspace
218
touch src/fixposition-sdk/examples/COLCON_IGNORE # Ignore all examples, or
219
touch src/fixposition-sdk/examples/ros2_fpsdk_demo/COLCON_IGNORE # Ignore only this example
220
touch src/fixposition-sdk/fpsdk_ros1/COLCON_IGNORE
221
@endcode
222
223
<!-- trick doxygen -->
224
225
@subsection FPSDK_BUILD_DETAILS Details
226
227
Refer to the various CMakeList.txt files, the CI workflow configuration (`.github/workflows/ci.yml`)
228
and the CI script (`docker/ci.sh`) for details on how things are done.
229
230
231
232
*/
233
234
// clang-format on
235
/* ****************************************************************************************************************** */
236
}
// namespace fpsdk
237
#endif
// __FPSDK_BUILD_HPP__
fpsdk
Fixposition SDK.
Definition
fpsdk_build.hpp:17
fpsdk_doc
fpsdk_build.hpp
Generated on Wed Jul 30 2025 09:04:07 for Fixposition SDK by
1.11.0