Closed mcudsm closed 2 years ago
请提供完整的程序和测试步骤,供我复现。
关于不可避免的拷贝,可以参考 https://github.com/ros-perception/image_common/issues/212
您这个包编译没通过,如下错误
Starting >>> shm_msgs
--- stderr: shm_msgs
CMake Warning at /opt/ros/galactic/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:235 (add_library):
Cannot generate a safe runtime search path for target
shm_msgs__rosidl_typesupport_fastrtps_c__pyext because files in some
directories may conflict with libraries in implicit directories:
runtime library [libssl.so.1.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/home/daism/anaconda3/lib
runtime library [libcrypto.so.1.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/home/daism/anaconda3/lib
Some of these libraries may not be found correctly. Call Stack (most recent call first): /opt/ros/galactic/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include) /opt/ros/galactic/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions) CMakeLists.txt:127 (rosidl_generate_interfaces)
Failed <<< shm_msgs [28.4s, exited with code 2]
Summary: 0 packages finished [28.7s] 1 package failed: shm_msgs 1 package had stderr output: shm_msgs
所以我用了另一个测试包https://github.com/ApexAI/ros2_shm_demo iceoryx使用的是https://github.com/eclipse-iceoryx/iceoryx.git 测试环境ros2 galactic ubuntu20.04 x86 测试步骤: 现启动iceoryx中的roudi 然后export 开启dds零拷贝的配置xml文件 然后分别运行ros2_shm_demo包中的talker与listener 现象:发送话题的地址与接收话题的地址不一致,按我的理解,发送方申请一块共享内存,接收方从这个内存读取数据,那么发送与接收因该是对同一个地址操作吧。
所以我用了另一个测试包https://github.com/ApexAI/ros2_shm_demo
这个麻烦到https://github.com/ApexAI/ros2_shm_demo 提交issue哦
现象:发送话题的地址与接收话题的地址不一致,按我的理解,发送方申请一块共享内存,接收方从这个内存读取数据,那么发送与接收因该是对同一个地址操作吧。
在pub和sub的全流程中,如果出现了拷贝,那么地址就会不一致,这里的zero-copy指的是使用了dds的零拷贝机制。
加wechat: zhensheng_li 讨论。
您这个包编译没通过,如下错误
@mcudsm 编译原因已经解决,更新代码再试一下,如果有问题再打开该issue.
为啥我测试着不是一个地址呢