Background
An upstream proposal is in progress to modify rosidl_generator_cpp so that uint8[] fields in message definitions are generated as rcl_buffer::Buffer<uint8_t> instead of std::vector<uint8_t>. Concretely, this means types like sensor_msgs::msg::Image or sensor_msgs::msg::PointCloud2::data would carry a rcl_buffer::Buffer<uint8_t> in the upstream ROS 2 type system.
Buffer<T> is designed with a polymorphic backend, allowing it to hold pointers to data residing on either CPU or GPU memory under a single unified type.
Impact on Agnocast
This change is a strong tailwind for Agnocast's GPU memory support:
-
Custom shadowing types become unnecessary.
Currently, handling GPU-backed PointCloud2 or Image data requires maintaining custom wrapper classes that shadow the upstream message types (e.g., duplicating the data field with a GPU-aware allocator). Once rcl_buffer::Buffer<T> lands upstream, the vanilla message types can be used as-is.
-
GPU memory lifetime management remains Agnocast's responsibility.
This upstream change is not the same as Agnocast's GPU memory support. The lifetime of GPU memory across processes — tracked via ipc_shared_ptr — is still uniquely Agnocast's concern and remains a core differentiator of our zero-copy IPC design.
Action Items
References
Background
An upstream proposal is in progress to modify
rosidl_generator_cppso thatuint8[]fields in message definitions are generated asrcl_buffer::Buffer<uint8_t>instead ofstd::vector<uint8_t>. Concretely, this means types likesensor_msgs::msg::Imageorsensor_msgs::msg::PointCloud2::datawould carry arcl_buffer::Buffer<uint8_t>in the upstream ROS 2 type system.Buffer<T>is designed with a polymorphic backend, allowing it to hold pointers to data residing on either CPU or GPU memory under a single unified type.Impact on Agnocast
This change is a strong tailwind for Agnocast's GPU memory support:
Custom shadowing types become unnecessary.
Currently, handling GPU-backed
PointCloud2orImagedata requires maintaining custom wrapper classes that shadow the upstream message types (e.g., duplicating thedatafield with a GPU-aware allocator). Oncercl_buffer::Buffer<T>lands upstream, the vanilla message types can be used as-is.GPU memory lifetime management remains Agnocast's responsibility.
This upstream change is not the same as Agnocast's GPU memory support. The lifetime of GPU memory across processes — tracked via
ipc_shared_ptr— is still uniquely Agnocast's concern and remains a core differentiator of our zero-copy IPC design.Action Items
rosidl_generator_cppproposal and track its progress toward mergermw_zenoh_cpponlyrcl_buffer::Buffer<T>is availableipc_shared_ptrlifetime semantics need any adjustment when wrappingBuffer<T>-backed messagesReferences
nvcyc/ros2meta repo (prototype source)