Colcon build failes with fastrtps error
I'm trying to build performance_test for FastDDS with such command:
colcon build --install-base /opt/performance_test --merge-install --cmake-clean-cache --cmake-args -DCMAKE_BUILD_TYPE=Release -DPERFORMANCE_TEST_PLUGIN=FASTDDS
And it shows me the error:
Starting >>> performance_test
--- stderr: performance_test
CMake Error at CMakeLists.txt:176 (find_package):
By not providing "Findfastrtps_cmake_module.cmake" in CMAKE_MODULE_PATH
this project has asked CMake to find a package configuration file provided
by "fastrtps_cmake_module", but CMake did not find one.
Could not find a package configuration file provided by
"fastrtps_cmake_module" with any of the following names:
fastrtps_cmake_moduleConfig.cmake
fastrtps_cmake_module-config.cmake
Add the installation prefix of "fastrtps_cmake_module" to CMAKE_PREFIX_PATH
or set "fastrtps_cmake_module_DIR" to a directory containing one of the
above files. If "fastrtps_cmake_module" provides a separate development
package or SDK, be sure it has been installed.
---
Failed <<< performance_test [2.03s, exited with code 1]
Summary: 0 packages finished [2.61s]
1 package failed: performance_test
1 package had stderr output: performance_test
1 package not processed
For CycloneDDS it works fine.
FastDDS installed in /opt/Fast-DDS. I did it step by step like in Dockerfile.FastDDS file. So Fast-DDS was built with that command:
colcon build \
--install-base /opt/Fast-DDS \
--merge-install \
--packages-up-to fastrtps \
--cmake-clean-cache \
--cmake-args \
--no-warn-unused-cli \
-DCMAKE_BUILD_TYPE=Release \
-DSECURITY=ON
Also did
chmod +x /perf_test_ws/src/performance_test/performance_test/bin/fastrtpsgen
source /opt/ros/galactic/setup.bash && source /opt/Fast-DDS/setup.bash