Build
Table of contents
Note: For all build commands, the workspace overlay should not be sourced
Note: zsh has been used. Change any setup.zsh occurrence with setup.$SHELL wherever it is needed.
Host Build
This builds the ROS2 workspace. It always necessary as it also creates the acceleration directory that is needed for Target Builds.
source $ROS2_HOME/setup.zsh
colcon build --merge-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release --parallel-workers 32
Docker
Alternatively, a Dockerfile is provided that automatize the Host Build. To build the docker image, do
make -C docker build
And to run the docker image:
make -C docker run
Note: Inside the container, the ros overlay can be found at /openvslam_acceleration
Note: Inside the container, the default dataset can be found at /data/euroc/Machine_Hall_01
Target Build
This builds the workspace for the target board. The target board selection is done through colcon acceleration select command.
KV260
source $ROS2_HOME/setup.zsh
colcon acceleration select kv260-soallak
colcon build --build-base=build-kv260-soallak --install-base=install-kv260-soallak --merge-install --mixin kv260-soallak --cmake-args -DROS_VITIS=ON -DCMAKE_BUILD_TYPE=Release -DNO_IMAGE_PROC_KERNEL=ON
The -DNO_IMAGE_PROC_KERNEL=ON cmake argument is used to disable HW Compilation of image_proc kernels. These include rectification and resize kernels which are not needed for the OpenVSLAM demonstration currently.
Disable All Kernels
This done by passing -DNOKERNELS=ON to the build command, for example, for KV260:
colcon build --build-base=build-kv260-soallak --install-base=install-kv260-soallak --merge-install --mixin kv260-soallak --cmake-args -DROS_VITIS=ON -DCMAKE_BUILD_TYPE=Release -DNOKERNELS=ON
Sometimes, there is no need to re-trigger Vitis. This is not detected automatically, that is why -DNOKERNELS=ON was introduced to reduce drastically the compilation time when FPGA related code has not been changed.
Enable Tracing
To enable tracing add -DTRACETOOLS_LTTNG_ENABLED=ON to --cmake-args.