@小鱼 现在是docker与上位机通过iperf3测试发现udp与tcp都是通的,两台设备编码格式不同会对topic产生影响吗?
重要提示
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
2235674044 发布的帖子
-
RE: docker中的ros2发送组播 上位机ros2接收不到
-
RE: docker中的ros2发送组播 上位机ros2接收不到
@小鱼 是的 和上位机通讯 貌似是被docker隔离了
上位机可以ping通docker0的ip地址 容器也可以ping通上位机 -
RE: docker中的ros2发送组播 上位机ros2接收不到
@小鱼 创建容器时我试着加入-v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host 发现还是不行 容器可以ping通上位机,上位机也可以ping通容器
上图下边两个小的终端是容器内部ros2 底下的终端是上位机ros2 -
docker中的ros2发送组播 上位机ros2接收不到
docker中ubuntu容器可以ping通上位机,但是容器中的ros2使用ros2 multicast send发送组播,上位机的ros2接收不到
-
RE: ros2 galactic:Could not find ROS middleware implementation 'NOTFOUND'.
@小鱼 解决了,是qemu模拟环境问题,放到实际环境下就ok了
-
RE: ros2 galactic:Could not find ROS middleware implementation 'NOTFOUND'.
@小鱼 我发现好像没有这个文件
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:/#
是不是这个问题,该怎么解决呢 -
RE: ros2 galactic:Could not find ROS middleware implementation 'NOTFOUND'.
@小鱼 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 -
RE: ros2 galactic:Could not find ROS middleware implementation 'NOTFOUND'.
@小鱼 我重新下载了一下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
-
RE: ros2 galactic:Could not find ROS middleware implementation 'NOTFOUND'.
@小鱼 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 -
RE: ros2 galactic:Could not find ROS middleware implementation 'NOTFOUND'.
@小鱼 docker用的是arm64的 Ubuntu20.04
-
使用rviz2中的PointCloud打点Status:Error
原码如下:
#include "rclcpp/rclcpp.hpp" #include "std_msgs/msg/string.hpp" #include "std_msgs/msg/u_int32.hpp" #include "sensor_msgs/point_cloud_conversion.hpp" #include "sensor_msgs/point_cloud2_iterator.hpp" #include <chrono> #include <memory> using namespace std::chrono_literals; using namespace geometry_msgs; using std::placeholders::_1; using std::placeholders::_2; /* 创建一个类节点,名字叫做SingleDogNode,继承自Node. */ class SingleDogNode : public rclcpp::Node { public: // 构造函数,有一个参数为节点名称 SingleDogNode(std::string name) : Node(name) { publisher_ = this->create_publisher<sensor_msgs::msg::PointCloud>("multi_points", 10); timer_ = this->create_wall_timer(1s, std::bind(&SingleDogNode::timer_callback, this)); } private: rclcpp::TimerBase::SharedPtr timer_; sensor_msgs::msg::PointCloud point_data; rclcpp::Publisher<sensor_msgs::msg::PointCloud>::SharedPtr publisher_; char count_x = 0; char count_y = 0; void timer_callback() { geometry_msgs::msg::Point32 p; p.x = count_x; p.y = count_y; p.z = 0; point_data.points.push_back(p); publisher_->publish(point_data); count_x++; count_y++; } }; int main(int argc, char **argv) { rclcpp::init(argc, argv); /*产生一个Wang2的节点*/ auto node = std::make_shared<SingleDogNode>("li4"); /* 运行节点,并检测退出信号*/ rclcpp::spin(node); rclcpp::shutdown(); return 0; }
运行结果:
工程目录
请问是哪一块出问题了