小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
colcon build --packages-up-to fishbot_navigation2 失败
-
--- stderr: nav2_velocity_smoother
CMake Error at /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_cmake_gtest-extras.cmake:85 (add_subdirectory):
add_subdirectory given source
"/home/shouyu/ros2_humble/install/gtest_vendor/src/gtest_vendor" which is
not an existing directory.
Call Stack (most recent call first):
/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake:35 (_ament_cmake_gtest_find_gtest)
/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest.cmake:68 (ament_add_gtest_executable)
test/CMakeLists.txt:2 (ament_add_gtest)CMake Error at /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_cmake_gtest-extras.cmake:89 (set_target_properties):
set_target_properties Can not find target to add properties to: gtest
Call Stack (most recent call first):
/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake:35 (_ament_cmake_gtest_find_gtest)
/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest.cmake:68 (ament_add_gtest_executable)
test/CMakeLists.txt:2 (ament_add_gtest)CMake Error at /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_cmake_gtest-extras.cmake:91 (target_compile_options): Cannot specify compile options for target "gtest" which is not built by this project. Call Stack (most recent call first): /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake:35 (_ament_cmake_gtest_find_gtest) /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest.cmake:68 (ament_add_gtest_executable) test/CMakeLists.txt:2 (ament_add_gtest) CMake Error at /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_cmake_gtest-extras.cmake:93 (target_include_directories): Cannot specify include directories for target "gtest" which is not built by this project. Call Stack (most recent call first): /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake:35 (_ament_cmake_gtest_find_gtest) /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest.cmake:68 (ament_add_gtest_executable) test/CMakeLists.txt:2 (ament_add_gtest) CMake Error at /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_cmake_gtest-extras.cmake:94 (target_include_directories): Cannot specify include directories for target "gtest_main" which is not built by this project. Call Stack (most recent call first): /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake:35 (_ament_cmake_gtest_find_gtest) /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest.cmake:68 (ament_add_gtest_executable) test/CMakeLists.txt:2 (ament_add_gtest)
以上是我执行
colcon build --packages-up-to fishbot_navigation2
的报错。 有没有大佬能帮我看看为什麽?已经尝试的步骤
- sudo apt install ros-humble-gtest-vendor