Comment corriger l'erreur ROS2 : catkinConfig.cmake
Problème
Lors de la tentative de compilation d’un paquet ROS en utilisant colcon build, vous voyez un message d’erreur tel que
cmake_error_catkin.txt
CMake Error at CMakeLists.txt:6 (find_package):
By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "catkin", but
CMake did not find one.
Could not find a package configuration file provided by "catkin" with any
of the following names:
catkinConfig.cmake
catkin-config.cmake
Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
"catkin_DIR" to a directory containing one of the above files. If "catkin"
provides a separate development package or SDK, be sure it has been
installed.Solution
Catkin n’est actuellement pas disponible sous une forme adaptée pour l’installer depuis les sources officielles ROS2.
Par conséquent, clonez le dépôt, compilez-le en utilisant colcon puis exécutez source install/setup.bash avant de compiler votre paquet.
build_catkin.sh
git clone https://github.com/ros/catkin.git
cd catkin
colcon build
source install/setup.bashAprès cela (dans le même shell), compilez à nouveau votre autre paquet en utilisant colcon build.
Check out similar posts by category:
ROS
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow