紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
控制OLED-自定义消息接口 按步骤删除.pio/libdeps/featheresp32/micro_ros_platformio/libmicroros重新编译出错
-
问题 :按步骤删除.pio/libdeps/featheresp32/micro_ros_platformio/libmicroros重新编译出错
错误如下Building micro-ROS library * Build mcu micro-ROS environment failed: * --- stderr: rosidl_typesupport_interface * CMake Warning: * Manually-specified variables were not used by the project: * * CMAKE_POSITION_INDEPENDENT_CODE * THIRDPARTY * * * --- * --- stderr: test_interface_files * CMake Warning: * Manually-specified variables were not used by the project: * * BUILD_SHARED_LIBS * CMAKE_POSITION_INDEPENDENT_CODE * THIRDPARTY * * * --- * --- stderr: microcdr * CMake Warning: * Manually-specified variables were not used by the project: * * BUILD_TESTING * THIRDPARTY * * * --- * --- stderr: rmw_implementation_cmake * CMake Warning: * Manually-specified variables were not used by the project: * * BUILD_SHARED_LIBS * CMAKE_POSITION_INDEPENDENT_CODE * THIRDPARTY * * * --- * --- stderr: rosidl_adapter * CMake Warning: * Manually-specified variables were not used by the project: * * BUILD_SHARED_LIBS * CMAKE_POSITION_INDEPENDENT_CODE * THIRDPARTY * * * --- * --- stderr: rcutils * CMake Warning: * Manually-specified variables were not used by the project: * * ENABLE_TESTING * THIRDPARTY * * * In function 'rcutils_char_array_strncat', * inlined from 'rcutils_char_array_strcat' at /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/char_array.c:239:10: * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/char_array.c:224:3: warning: 'strncat' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] * strncat(char_array->buffer, src, n); * ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/char_array.c: In function 'rcutils_char_array_strcat': * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/char_array.c:239:10: note: length computed here * return rcutils_char_array_strncat(char_array, src, strlen(src)); * ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/error_handling.c: In function 'rcutils_get_error_string': * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/error_handling.c:240:38: warning: initializer-string for array of chars is too long * return (rcutils_error_string_t) {"error not set"}; // NOLINT(readability/braces) * ^~~~~~~~~~~~~~~ * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/error_handling.c:240:38: note: (near initialization for '(anonymous).str') * In file included from /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/error_handling.c:35: * At top level: * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/./error_handling_helpers.h:109:1: warning: '__rcutils_convert_uint64_t_into_c_str' defined but not used [-Wunused-function] * __rcutils_convert_uint64_t_into_c_str(uint64_t number, char * buffer, size_t buffer_size) * ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/src/rcutils/src/./error_handling_helpers.h:91:1: warning: '__rcutils_reverse_str' defined but not used [-Wunused-function] * __rcutils_reverse_str(char * string_in, size_t string_len) * ^~~~~~~~~~~~~~~~~~~~~ * --- * --- stderr: tracetools * CMake Warning: * Manually-specified variables were not used by the project: * * THIRDPARTY * * * --- * --- stderr: rosidl_parser * CMake Warning: * Manually-specified variables were not used by the project: * * BUILD_SHARED_LIBS * CMAKE_POSITION_INDEPENDENT_CODE * THIRDPARTY * * * --- * --- stderr: rosidl_runtime_c * CMake Warning at /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): * Package 'rcutils' exports library 'dl' which couldn't be found * Call Stack (most recent call first): * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) * CMakeLists.txt:15 (find_package) * * * CMake Warning: * Manually-specified variables were not used by the project: * * THIRDPARTY * * * --- * --- stderr: microxrcedds_client * CMake Warning: * Manually-specified variables were not used by the project: * * BUILD_TESTING * THIRDPARTY * * * --- * --- stderr: rosidl_cmake * CMake Warning: * Manually-specified variables were not used by the project: * * BUILD_SHARED_LIBS * CMAKE_POSITION_INDEPENDENT_CODE * THIRDPARTY * * * --- * --- stderr: rcl_logging_interface * CMake Warning at /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): * Package 'rcutils' exports library 'dl' which couldn't be found * Call Stack (most recent call first): * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) * CMakeLists.txt:19 (find_package) * * * CMake Warning: * Manually-specified variables were not used by the project: * * THIRDPARTY * * * --- * --- stderr: rmw * CMake Warning at /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): * Package 'rcutils' exports library 'dl' which couldn't be found * Call Stack (most recent call first): * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) * CMakeLists.txt:21 (find_package) * * * CMake Warning: * Manually-specified variables were not used by the project: * * THIRDPARTY * * * --- * --- stderr: rcl_logging_noop * CMake Warning at /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): * Package 'rcutils' exports library 'dl' which couldn't be found * Call Stack (most recent call first): * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcl_logging_interface/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package) * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcl_logging_interface/cmake/rcl_logging_interfaceConfig.cmake:41 (include) * CMakeLists.txt:15 (find_package) * * * CMake Warning: * Manually-specified variables were not used by the project: * * THIRDPARTY * * * --- * --- stderr: rosidl_generator_c * CMake Warning: * Manually-specified variables were not used by the project: * * THIRDPARTY * * * --- * --- stderr: rosidl_typesupport_introspection_c * CMake Warning: * Manually-specified variables were not used by the project: * * THIRDPARTY * * * --- * --- stderr: rosidl_typesupport_microxrcedds_c * CMake Warning at /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): * Package 'rcutils' exports library 'dl' which couldn't be found * Call Stack (most recent call first): * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_runtime_c/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package) * /home/zrc/ESP32Code/OLED/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_runtime_c/cmake/rosidl_runtime_cConfig.cmake:41 (include) * CMakeLists.txt:22 (find_package) * * * CMake Warning: * Manually-specified variables were not used by the project: * * THIRDPARTY * * * --- * --- stderr: fishbot_interfaces * CMake Error at CMakeLists.txt:25 (find_package): * By not providing "Findrosidl_default_generators.cmake" in CMAKE_MODULE_PATH * this project has asked CMake to find a package configuration file provided * by "rosidl_default_generators", but CMake did not find one. * * Could not find a package configuration file provided by * "rosidl_default_generators" with any of the following names: * * rosidl_default_generatorsConfig.cmake * rosidl_default_generators-config.cmake * * Add the installation prefix of "rosidl_default_generators" to * CMAKE_PREFIX_PATH or set "rosidl_default_generators_DIR" to a directory * containing one of the above files. If "rosidl_default_generators" provides * a separate development package or SDK, be sure it has been installed. * * * --- * Failed <<< fishbot_interfaces [1.40s, exited with code 1] * * ================================================================= [FAILED] Took 210.74 seconds =================================================================
我的Cmakelists.txt和package.xml全是按照作者的复制粘贴。
Cmakelists.txt如下cmake_minimum_required(VERSION 3.8) project(fishbot_interfaces) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif() # find dependencies find_package(ament_cmake REQUIRED) # uncomment the following section in order to fill in # further dependencies manually. # find_package(<dependency> REQUIRED) if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) # the following line skips the linter which checks for copyrights # comment the line when a copyright and license is added to all source files set(ament_cmake_copyright_FOUND TRUE) # the following line skips cpplint (only works in a git repo) # comment the line when this package is in a git repo and when # a copyright and license is added to all source files set(ament_cmake_cpplint_FOUND TRUE) ament_lint_auto_find_test_dependencies() endif() find_package(rosidl_default_generators REQUIRED) rosidl_generate_interfaces(${PROJECT_NAME} "srv/OledControl.srv" ) ament_package()
package.xml如下
<?xml version="1.0"?> <?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> <package format="3"> <name>fishbot_interfaces</name> <version>0.0.0</version> <description>TODO: Package description</description> <maintainer email="zrc@todo.todo">zrc</maintainer> <license>TODO: License declaration</license> <member_of_group>rosidl_interface_packages</member_of_group> <buildtool_depend>ament_cmake</buildtool_depend> <test_depend>ament_lint_auto</test_depend> <test_depend>ament_lint_common</test_depend> <export> <build_type>ament_cmake</build_type> </export> </package>
之前直接colcon build这一步都成功的,但是到这就失败了。求小鱼大佬和过往的英雄好汉们解答,感谢!
系统版本Ubuntu 22.04
我人在海外,我不知道是不是网络的问题
此外,我将库的源替换成海外源
https://github.com/micro-ROS/micro_ros_platformio.git
又发生了错误Building micro-ROS library Build mcu micro-ROS environment failed: --- stderr: rcl_logging_interface CMake Warning at /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): Package 'rcutils' exports library 'dl' which couldn't be found Call Stack (most recent call first): /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) CMakeLists.txt:20 (find_package) --- --- stderr: rosidl_runtime_c CMake Warning at /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): Package 'rcutils' exports library 'dl' which couldn't be found Call Stack (most recent call first): /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) CMakeLists.txt:15 (find_package) --- --- stderr: rosidl_dynamic_typesupport CMake Warning at /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): Package 'rcutils' exports library 'dl' which couldn't be found Call Stack (most recent call first): /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) CMakeLists.txt:26 (find_package) --- --- stderr: rcl_logging_noop CMake Warning at /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): Package 'rcutils' exports library 'dl' which couldn't be found Call Stack (most recent call first): /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcl_logging_interface/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcl_logging_interface/cmake/rcl_logging_interfaceConfig.cmake:41 (include) CMakeLists.txt:16 (find_package) --- --- stderr: rmw CMake Warning at /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): Package 'rcutils' exports library 'dl' which couldn't be found Call Stack (most recent call first): /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) CMakeLists.txt:22 (find_package) --- --- stderr: rosidl_typesupport_microxrcedds_c CMake Warning at /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): Package 'rcutils' exports library 'dl' which couldn't be found Call Stack (most recent call first): /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_runtime_c/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_runtime_c/cmake/rosidl_runtime_cConfig.cmake:41 (include) CMakeLists.txt:22 (find_package) --- --- stderr: micro_ros_utilities CMake Warning at /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): Package 'rcutils' exports library 'dl' which couldn't be found Call Stack (most recent call first): /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_runtime_c/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_runtime_c/cmake/rosidl_runtime_cConfig.cmake:41 (include) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_typesupport_introspection_c/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_typesupport_introspection_c/cmake/rosidl_typesupport_introspection_cConfig.cmake:41 (include) CMakeLists.txt:18 (find_package) --- --- stderr: rosidl_typesupport_c CMake Warning at /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): Package 'rcutils' exports library 'dl' which couldn't be found Call Stack (most recent call first): /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) CMakeLists.txt:34 (find_package) --- --- stderr: builtin_interfaces CMake Warning at /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message): Package 'rcutils' exports library 'dl' which couldn't be found Call Stack (most recent call first): /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_runtime_c/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_runtime_c/cmake/rosidl_runtime_cConfig.cmake:41 (include) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_typesupport_introspection_c/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_typesupport_introspection_c/cmake/rosidl_typesupport_introspection_cConfig.cmake:41 (include) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_typesupport_c/cmake/rosidl_typesupport_c-extras.cmake:13 (find_package) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_typesupport_c/cmake/rosidl_typesupport_cConfig.cmake:41 (include) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_core_generators/cmake/rosidl_core_generators-extras.cmake:21 (find_package) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_core_generators/cmake/rosidl_core_generatorsConfig.cmake:41 (include) CMakeLists.txt:17 (find_package) CMake Error at /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_typesupport_c/cmake/get_used_typesupports.cmake:35 (message): No 'rosidl_typesupport_cpp' found Call Stack (most recent call first): /opt/ros/humble/share/rosidl_typesupport_cpp/cmake/rosidl_typesupport_cpp-extras.cmake:8 (get_used_typesupports) /opt/ros/humble/share/rosidl_typesupport_cpp/cmake/rosidl_typesupport_cppConfig.cmake:41 (include) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_core_generators/cmake/rosidl_core_generators-extras.cmake:21 (find_package) /home/zrc/ESP32Code/OLED1/.pio/libdeps/featheresp32/micro_ros_platformio/build/mcu/install/share/rosidl_core_generators/cmake/rosidl_core_generatorsConfig.cmake:41 (include) CMakeLists.txt:17 (find_package) --- Failed <<< builtin_interfaces [0.41s, exited with code 1]
-
@铁盒的序 你好,这两天有点忙,今天才抽空看,变更下代码路径试试
-
@小鱼 老师您好,可以告诉一下详细的步骤吗?我刚刚接触ros2,有些地方还很生疏,谢谢您