You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Experience zero-copy (received object address == published object address)
Run ros2 topic echo number
The received object doesn't have the same address as the published one anymore
Expected behavior
I expect the received object address to always be the published object address even when also subscribing to the topic externally.
Actual behavior
The received object has been copied.
Additional information
NOTE: The object is reallocated to the same address in the lambda function
NOTE: The Published address when listening is equal to the last received address; Due to allocation optimization?
$ ros2 run intra_process_demo two_node_pipeline
Published message with value: 0, and address: 0x563E68561220
Received message with value: 0, and address: 0x563E68561220
Published message with value: 1, and address: 0x563E68561220
Received message with value: 1, and address: 0x563E68561220
Published message with value: 2, and address: 0x563E68561220
Received message with value: 2, and address: 0x563E68561220
Published message with value: 3, and address: 0x563E68561220
Received message with value: 3, and address: 0x563E68561220
Published message with value: 4, and address: 0x563E68561220
Received message with value: 4, and address: 0x563E68561220
Published message with value: 5, and address: 0x563E68561220
Received message with value: 5, and address: 0x563E68561220
Published message with value: 6, and address: 0x563E68561220
Received message with value: 6, and address: 0x563E68561220
Published message with value: 7, and address: 0x563E68561220
Received message with value: 7, and address: 0x563E68561220
Published message with value: 8, and address: 0x563E68561220
Received message with value: 8, and address: 0x563E685D29D0
Published message with value: 9, and address: 0x563E685D29D0
Received message with value: 9, and address: 0x563E68561220
Published message with value: 10, and address: 0x563E68561220
Received message with value: 10, and address: 0x563E685D29D0
Published message with value: 11, and address: 0x563E685D29D0
Received message with value: 11, and address: 0x563E68561220
Published message with value: 12, and address: 0x563E68561220
Received message with value: 12, and address: 0x563E68561220
Alright, yeah, I see the problem. I'll open an issue on rclcpp, to assess whether to hotfix or backport (as this is fixed in Eloquent). Thanks for reporting!
Bug report
Intra process communication has a
Required Info:
Steps to reproduce issue
ros2 run intra_process_demo two_node_pipeline
ros2 topic echo number
Expected behavior
I expect the received object address to always be the published object address even when also subscribing to the topic externally.
Actual behavior
The received object has been copied.
Additional information
$ ros2 topic echo number data: 8 --- data: 9 --- data: 10 --- data: 11 ---
The text was updated successfully, but these errors were encountered: