Replies: 10 comments 16 replies
-
|
In the coming days, Pull Requests will be submitted to the Autoware repositories to apply Agnocast to the following two topics.
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks, this looks interesting, but I have few questions:
|
Beta Was this translation helpful? Give feedback.
-
|
For large static-sized messages, how does it compare to iceoryx? |
Beta Was this translation helpful? Give feedback.
-
|
Notes from a separate call among @xmfcx, @sykwer, and @mitsudome-r
Discussion Points:
|
Beta Was this translation helpful? Give feedback.
-
|
https://github.com/orgs/autowarefoundation/discussions/5861 The slides used in the Software Working Group (3/11). |
Beta Was this translation helpful? Give feedback.
-
|
Hi @sykwer iceoryx dev here :) First, congratulations to Agnocast :) It's always interesting to see the different unique approaches taken to shared memory communication. I skimmed over the documentation, however have a few questions and I hope it’s alright if I ask them:
Currently, we are developing iceoryx2 at ekxide. Similar to you, we also know too well of the limitations of iceoryx classic and we try to tackle all of them with iceoryx2. For example, inceoryx2 does not require a central daemon and since the v0.5 release from last December, we fully support dynamic arrays. We do not yet support fully dynamic types like We are currently also working on a rmw_iceoryx2 and the next release is in the works. With that release, we will support unbounded messages via serialization. The overhead of serialization is noticeable however our latest numbers are below 0.4ms for 1MB. I guess you are using it via CycloneDDS, right? It would be great to exchange ideas in the interest of pursuing the best solutions. Btw, if you like, we could also help you to add iceoryx2 to your benchmark. Oh, and we can also just move this discussion to your repo or to eclipse-iceoryx. |
Beta Was this translation helpful? Give feedback.
-
|
A conference paper on Agnocast has been accepted to ISORC 2025 and will be published in May. |
Beta Was this translation helpful? Give feedback.
-
|
@mitsudome-r Currently, I'm working on applying Agnocast to the following two large topics in autoware.universe:
However, I found that some related functions and subscribers have been move to autoware.core recently. So the questions is: "Is it possible to introduce Agnocast dependency into autoware.core?". |
Beta Was this translation helpful? Give feedback.
-
|
Agnocast Adoption Tracker |
Beta Was this translation helpful? Give feedback.
-
|
Academic Paper Tracker
|
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
TL;DR;
Agnocast repo: https://github.com/tier4/agnocast
Autoware mitigates the overhead of Pub/Sub communication between nodes by using
ComponentContainerto host multiple nodes within the same process.However, not all nodes can currently be consolidated into a single process, leading to significant inter-process communication (IPC) costs, especially when transferring large messages such asPointCloud2.From a fault isolation perspective, it is preferable to place each node in a separate process, making the long-term goal to phase out the use of
ComponentContainer.To achieve a one-node-per-process architecture while minimizing IPC overhead, zero-copy communication between processes is essential.Existing zero-copy middleware solutions include IceOryx (https://iceoryx.io/), which can be integrated seamlessly when using CycloneDDS without requiring changes to the technology stack (https://github.com/ros2/rmw_cyclonedds/blob/rolling/shared_memory_support.md). However, IceOryx only supports zero-copy communication for message types with static size. Since Autoware extensively relies on unsized sized message types (e.g., messages containing
std::vectorfields), integrating IceOryx poses significant challenges.A zero-copy middleware suitable for Autoware must satisfy all of the following requirements:
While IceOryx meets all requirements except the first, no existing middleware—either in production or in research—fully satisfies all these criteria. Some prior research has explored solutions addressing the first requirement, but no middleware has yet achieved comprehensive compliance with all four requirements, even at the research level.
To address these challenges, TIER IV has developed Agnocast (https://github.com/tier4/agnocast), a zero-copy middleware that fully satisfies all four requirements. Agnocast supports "True Zero-Copy Communication" by eliminating both serialization and deserialization, ensuring optimal efficiency. In this discussion, we will introduce the integration of Agnocast into Autoware and explore any overlooked concerns that may need further consideration.
Agnocast Software Stack
Agnocast consists of three main components:
As illustrated in the diagram, Agnocast operates independently of the ROS 2 software stack (rclcpp ~ rmw middleware). This independence allows it to function agnostically alongside any rmw middleware (e.g., any DDS), regardless of the specific implementation chosen. agnocast_heaphook is a dynamically injected library, inserted via LD_PRELOAD, that hooks heap-related functions such as malloc and free. agnocast_kmod serves as the central manager for Agnocast’s key data structures and is accessed via system calls from agnocastlib.
Required Modifications to Integrate Agnocast into Autoware
To apply Agnocast to Autoware, the following changes and operations are necessary:
LD_PRELOADand applying the Agnocast-specific executor.apt install ros-humble-agnocast)insmod /path/to/agnocast.ko)Agnocast provides a smart pointer called
agnocast::ipc_shared_ptr, which manages the lifetime of message objects transferred between processes. The only required change for publisher and subscription functions is to update their namespace fromrclcpptoagnocast.In the launch file, environment variables such as
LD_PRELOADmust be set to applyagnocast_heaphookto processes participating in Agnocast communication. Additionally, for ComposableNode, the Agnocast-specific executor must be applied within the launch file.When the publisher and subscription are rewritten using Agnocast's API, the corresponding communication edge achieves True Zero-Copy—regardless of whether the nodes are in the same process or different processes. For all other communication edges, whether on the same host or across different hosts, the existing ROS 2 communication stack (e.g., DDS) remains operational.This means that communication edges can be incrementally transitioned to True Zero-Copy, starting with the most performance-critical bottlenecks. Currently, "ROS 2 Publish → Agnocast Subscription" is not supported, but it may be supported in the future.
The dependency packages will be released so that they can be installed using commands such as
apt install ros-humble-agnocast(WIP: ros2-gbp/ros2-gbp-github-org#712, ros/rosdistro#44641).agnocast_heaphookandagnocast_kmodwill be released via a PPA and will be installed automatically along withagnocastlib. Foragnocast_kmod, it should either be explicitly inserted using theinsmodcommand or configured to be automatically inserted when the Linux system starts.Eliminate Side Effects of Agnocast Integration
As explained in the previous section, the modifications required to integrate Agnocast into Autoware are minimal. However, to further facilitate the initial integration, Agnocast will be integrated so that Autoware can be built without any dependency on Agnocast by default. In other words, it will be possible to build Autoware without installing
ros-humble-agnocast. When using the existing build commands, the generated build artifacts will remain unchanged. This is achieved by introducing macros, as shown in the example code.When the environment variable
ENABLE_AGNOCASTis set, these macros will expand to Agnocast's API and be used during the build process.The environment variable enforcement can be overridden using CMake options.
Additionally, the followings are considered:
Deployment Experiments and Evaluation Results at TIER IV
TIER IV conducted deployment experiments and performance evaluations of Agnocast in the following environments. In all cases, Agnocast was confirmed to function correctly:
This section shares the results of applying Agnocast to Autoware Universe v0.41.2. The applied code can be found in the following branch: https://github.com/veqcc/autoware/tree/test/agnocast
To target communication bottlenecks, the following topics were selected for Agnocast integration:
/sensing/lidar/*/pointcloud_before_sync/perception/obstacle_segmentation/pointcloudSince rviz subscribes to
⚠️ Note: The rosbag replay speed is x0.2, meaning that the measurements reflect a 1/5 scale of actual traffic.
/perception/obstacle_segmentation/pointcloud, communication with rviz continued using the existing DDS transport. The following results show the reduction in lo network traffic when applying Agnocast only to the/sensing/lidar/*/pointcloud_before_synctopic. (Applying Agnocast to/perception/obstacle_segmentation/pointclouddid not contribute to traffic reduction due to rviz's presence.). Left: before Agnocast applied, Right: after Agnocast applied.Applying Agnocast to the
/sensing/lidar/*/pointcloud_before_synctopic alone reduces lo traffic by 2/3. As Agnocast is applied to more topics, lo traffic will approach zero.Next, to verify that communication latency is nearly zero on edges where Agnocast is applied, we examine the latency measurements for the
/perception/obstacle_segmentation/pointcloudtopic.Next, we examine the improvement in Top LiDAR Preprocessing response time due to the zero communication latency of
/sensing/lidar/top/pointcloud_before_sync. Left: before Agnocast applied, Right: after Agnocast applied.The response time has improved by an average of approximately 4ms. As seen in the Response Time Details, this improvement is attributed to the near-zero communication latency of
/sensing/lidar/top/pointcloud_before_syncafter applying Agnocast.Applying Agnocast to topics that transfer large messages significantly reduced overall system memory consumption. Additionally, in processes where Agnocast was applied, DDS-related CPU usage was observed to decrease.
While this effect is not noticeable when applying Agnocast to only a few topics, full system-wide adoption would make Autoware startup instant. Currently, Autoware takes a long time to launch due to the DDS Discovery Protocol, whose message complexity scales with the square of the number of participants and the first power of the number of edges. As Agnocast is applied to more topics, the number of edges decreases, gradually reducing startup time.
Conference Paper and Document
A paper on Agnocast is accepted to ISORC 2025 and will be published in May.
currently under review and will be shared here once published.Additionally, the documentation is being written and will be shared here upon completion.
The release for Agnocast installation via apt install is currently in progress.
Beta Was this translation helpful? Give feedback.
All reactions