0
$\begingroup$

I would like to run a publisher and subscriber using zerocopy on ROS2 Humble with FastDDS. I followed the documentation to setup the env and also I am using minimal publisher and subscriber with loaned msgs (borrow_loaned_message).

Unfortunately, I get the following error when I run node.

[INFO] [1647016312.848229781] [rclcpp]: Currently used middleware can't loan messages. Local allocator will be used.

Does anyone know a fix for this or am I missing anything here to run the node with zero copy on ROS2 humble with FastDDS?

Will be grateful for the help.

$\endgroup$

1 Answer 1

1
$\begingroup$

Did you see this extra config required if you want to enable the loaned message API?

https://github.com/ros2/rmw_fastrtps?tab=readme-ov-file#enable-zero-copy-data-sharing

To enable Loaned Messages in Iron Irwini or later, the only requirement is for the data type to be Plain Old Data. For Humble Hawksbill, in addition to POD types, enabling Fast DDS Data Sharing is also required.

To enable Fast DDS Data Sharing delivery mechanism, the following XML profiles need to be loaded, and environment variable RMW_FASTRTPS_USE_QOS_FROM_XML needs to be set to 1 (see Full QoS configuration)

$\endgroup$
1
  • $\begingroup$ thank you very much $\endgroup$ Commented Aug 12 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.