如何修复 ROS2 错误:Could not find a package configuration file provided by "ros2_control_test_assets"
问题
在构建 ROS2 工作空间时,你可能会遇到以下错误:
ros2_control_test_assets_error.txt
CMake Warning at CMakeLists.txt:46 (find_package):
By not providing "Findros2_control_test_assets.cmake" in CMAKE_MODULE_PATH
this project has asked CMake to find a package configuration file provided
by "ros2_control_test_assets", but CMake did not find one.
Could not find a package configuration file provided by
"ros2_control_test_assets" with any of the following names:
ros2_control_test_assetsConfig.cmake
ros2_control_test_assets-config.cmake
Add the installation prefix of "ros2_control_test_assets" to
CMAKE_PREFIX_PATH or set "ros2_control_test_assets_DIR" to a directory
containing one of the above files. If "ros2_control_test_assets" provides
a separate development package or SDK, be sure it has been installed.
CMake Error at /opt/ros/jazzy/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake:77 (message):
ament_target_dependencies() the passed package name
'ros2_control_test_assets' was not found before
Call Stack (most recent call first):
CMakeLists.txt:49 (ament_target_dependencies)解决方案
你需要为你的 ROS 发行版安装 ros2-control,例如:
install_ros2_control.sh
sudo apt install ros-jazzy-ros2-control ros-jazzy-ros2-controllersIf this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow