Generic type conversion library supporting a variety of data structures.
Dependency | Version | Description |
---|---|---|
[Eigen3] | >= 3.3 | Linear Algebra Package |
[GTSAM] | - | GATech Smooth and Mapping Package |
[manif] | - | Lie Theory Package |
[MATLAB] | - | MATLAB CXX Interfaces |
[ROS] | noetic | Various standard ROS packages |
[sensorbox] | 0.3 | Sensor Processing Package |
Note that square brackets indicate optional dependencies.
It is recommended that you configure with ccmake
(sudo apt install cmake-curses-gui
) to see the various options. Otherwise use cmake
instead of ccmake
and set flags manually.
cd convert
mkdir build && cd build
ccmake ..
make -j
sudo make install
Note that the library will attempt to build as many of the components as possible.
cd build
sudo make uninstall
Import the package into your project and add the dependency to your target <target>
with:
find_package(convert REQUIRED)
target_link_libraries(<target> <PUBLIC|INTERFACE|PRIVATE> ${convert_LIBRARIES})
target_include_directories(<target> SYSTEM <PUBLIC|INTERFACE|PRIVATE> ${convert_INCLUDE_DIRS})
Note that it is important to call target_link_libraries
before target_include_directories
because the ${convert_LIBRARIES}
targets may contain compilation definitions that are required within the public header files in ${convert_INCLUDE_DIRS}
. In particular, these compile definitions are needed to enable the headers for enabled components in <convert/convert.hpp>
.
For more information, see convert/README.md and documentation.
Documentation must be turned on by setting the -DBUILD_DOCUMENTATION=ON
cmake argument.
To view the HTML documentation, open the build/docs/html/index.html
file.
To view the LaTeX documentation, build it with:
cd build/docs/latex
make
Then open the file refman.pdf
.
Tests must be turned on by setting the -DBUILD_TESTS=ON
cmake argument.
cd build
cmake -DBUILD_TESTS=ON ..
make -j
They can then be run with ctest
:
ctest --test-dir test
For more explicit output, the test executables can be run directly from the build directory.
A package.xml
is supplied to facilitate an isolated installation within a catkin workspace (e.g. for ROS applications).
Prerequisites of core C++ library plus the following:
Dependency | Version | Description |
---|---|---|
catkin | - | catkin build system |
To use this package with catkin, simply clone or symlink the repository to the workspace's src
directory, for example:
ln -s /path/to/convert /path/to/catkin_ws/src
cd /path/to/catkin_ws
catkin build convert
cd /path/to/catkin_ws
catkin clean convert
To use the package in a downstream project, one should add to their package.xml
:
<depend>convert</depend>
One can then either use the workspace's isolated installation or use the system installation otherwise.
Importing the dependency is then exactly the same as it would be in a non-catkin package as described above (do NOT rely on the catkin
variables like catkin_LIBRARIES
and catkin_INCLUDE_DIRS
).
Documentation must be turned on by setting the -DBUILD_DOCUMENTATION=ON
cmake argument. This can be done in catkin with:
catkin config --cmake-args -DBUILD_DOCUMENTATION=ON
Tests must be turned on by setting the -DBUILD_TESTS=ON
cmake argument. This can be done in catkin with:
catkin config --cmake-args -DBUILD_TESTS=ON