小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
ros2 galactic:Could not find ROS middleware implementation 'NOTFOUND'.
-
src:
cmake:
-
@2235674044 看你用的docker吗?感觉是ros2没装好,建议重新安装
-
@小鱼 docker用的是arm64的 Ubuntu20.04
-
-
@小鱼 Starting >>> village_wang
--- stderr: village_wang
CMake Error at /opt/ros/galactic/share/rmw_implementation_cmake/cmake/get_default_rmw_implementation.cmake:60 (message):
Could not find ROS middleware implementation 'NOTFOUND'. Choose one of the
following:
Call Stack (most recent call first):
/opt/ros/galactic/share/rmw_implementation/cmake/rmw_implementation-extras.cmake:19 (get_default_rmw_implementation)
/opt/ros/galactic/share/rmw_implementation/cmake/rmw_implementationConfig.cmake:41 (include)
/opt/ros/galactic/share/rcl/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
/opt/ros/galactic/share/rcl/cmake/rclConfig.cmake:41 (include)
/opt/ros/galactic/share/libstatistics_collector/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
/opt/ros/galactic/share/libstatistics_collector/cmake/libstatistics_collectorConfig.cmake:41 (include)
/opt/ros/galactic/share/rclcpp/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
/opt/ros/galactic/share/rclcpp/cmake/rclcppConfig.cmake:41 (include)
CMakeLists.txt:10 (find_package)
Failed <<< village_wang [26.0s, exited with code 1]
Summary: 0 packages finished [30.8s]
1 package failed: village_wang
1 package had stderr output: village_wang -
-
@小鱼 我重新下载了一下ros2发现可以colcon build了但是run的时候出现了新的问题
root@90cfb8fcddd4:/home/town_ws# ros2 run village_wang wang2_node
1675329115.510342 [0] wang2_node: ddsi_udp_create_conn: set IP_MULTICAST_IF failed: Bad Parameter
[ERROR] [1675329115.546947863] [rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Error[rcutils|error_handling.c:108] rcutils_set_error_state()
This error state is being overwritten:'error not set, at /tmp/binarydeb/ros-galactic-rcl-3.1.4/src/rcl/node.c:261'
with this new error message:
'rcl node's rmw handle is invalid, at /tmp/binarydeb/ros-galactic-rcl-3.1.4/src/rcl/node.c:413'
rcutils_reset_error() should be called after error handling to avoid this.
<<<
[ERROR] [1675329115.557758259] [rcl]: Failed to fini publisher for node: 1
terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
what(): failed to initialize rcl node: rcl node's rmw handle is invalid, at /tmp/binarydeb/ros-galactic-rcl-3.1.4/src/rcl/node.c:413
-
@2235674044 可以看下你怎么建立的docker吗
-
@小鱼 docker安装:https://www.runoob.com/docker/ubuntu-docker-install.html 使用里面官方安装脚本自动安装的
容器创建:
1.安装qemu
2.docker run -itd --rm --net=none --platform linux/arm64 ubuntu:20.04 /bin/bash安装ubuntu20.04 arm64版本镜像并创建容器
3.容器打包成镜像
4.docker run -itd 打包镜像 /bin/bash -
@小鱼 我发现好像没有这个文件
root@90cfb8fcddd4:/home/town_ws# cd /tmp/binarydeb/ros-galactic-rcl-3.1.4/src/rcl/
bash: cd: /tmp/binarydeb/ros-galactic-rcl-3.1.4/src/rcl/: No such file or directory
root@90cfb8fcddd4:/home/town_ws# cd /tmp/
root@90cfb8fcddd4:/tmp# ls
root@90cfb8fcddd4:/tmp# cd /
root@90cfb8fcddd4:/# find | grep ros-galactic-rcl-3.1.4
root@90cfb8fcddd4:/#
是不是这个问题,该怎么解决呢 -
@2235674044 具体我也不是很清楚
@2235674044 在 ros2 galactic:Could not find ROS middleware implementation 'NOTFOUND'. 中说:
--net=none
把这个改成--net=host看看,另外输入下ip a
检查下本地的localhost是否正常 -
@小鱼 解决了,是qemu模拟环境问题,放到实际环境下就ok了
-
@小鱼 实际上这个问题还是没有解决。我们的场景下确实有需求需要在qemu下使用ROS。这种情况下,还是会报错:
ddsi_udp_create_conn: set IP_MULTICAST_IF failed: Bad Parameter
。但是经过测试发现,仅cyclonedds会出现这种情况,而fastdds则没有问题。完整的报错如下:1700209913.854902 [0] main: selected interface "lo" is not multicast-capable: disabling multicast 1700209913.862237 [0] main: ddsi_udp_create_conn: set IP_MULTICAST_IF failed: Bad Parameter [ERROR] [1700209913.866479306] [rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Error >>> [rcutils|error_handling.c:108] rcutils_set_error_state() This error state is being overwritten: 'error not set, at /opt/ros/foxy/src/ros2/rcl/rcl/src/rcl/node.c:276' with this new error message: 'rcl node's rmw handle is invalid, at /opt/ros/foxy/src/ros2/rcl/rcl/src/rcl/node.c:428' rcutils_reset_error() should be called after error handling to avoid this. <<< [ERROR] [1700209913.873989803] [rcl]: Failed to fini publisher for node: 1
-
@rty813 在 ros2 galactic:Could not find ROS middleware implementation 'NOTFOUND'. 中说:
1700209913.854902 [0] main: selected interface "lo" is not multicast-capable: disabling multicast
1700209913.862237 [0] main: ddsi_udp_create_conn: set IP_MULTICAST_IF failed: Bad Parameter是没有解决,看提示估计因为只有一个 loopback ,且 lo 不支持多播,但关闭多播并没有传递到 ddsi_udp_create_conn 中,导致创建连接时在 lo 上依然启用多播造成失败,可以尝试手动启动 lo 的 多播,指令如下
sudo ip link set lo multicast on或者修改 cyclonedds 的代码修复,这个麻烦一些
-
@小鱼 好像还是qemu的问题。我设置了Multicast on,但是依然报错。
我是在x86上运行的armv7的镜像,就会出现这种问题。如果运行的是x86镜像,就正常的。