Ensuring safety in high-speed autonomous vehicles requires rapid control loops and tightly bounded delays from perception to actuation. Many open-source autonomy systems rely on ROS 2 middleware; when multiple sensor and control nodes share one compute unit, ROS 2 and its DDS transports add significant (de)serialization, copying, and discovery overheads, shrinking the available time budget. We present Sensor-in-Memory (SIM), a shared-memory transport designed for intra-host pipelines in autonomous vehicles. SIM keeps sensor data in native memory layouts (e.g., cv::Mat, PCL), uses lock-free bounded double buffers that overwrite old data to prioritize freshness, and integrates into ROS 2 nodes with four lines of code. Unlike traditional middleware, SIM operates beside ROS 2 and is optimized for applications where data freshness and minimal latency outweigh guaranteed completeness. SIM provides sequence numbers, a writer heartbeat, and optional checksums to ensure ordering, liveness, and basic integrity. On an NVIDIA Jetson Orin Nano, SIM reduces data-transport latency by up to 98% compared to ROS 2 zero-copy transports such as FastRTPS and Zenoh, lowers mean latency by about 95%, and narrows 95th/99th-percentile tail latencies by around 96%. In tests on a production-ready Level 4 vehicle running Autoware.Universe, SIM increased localization frequency from 7.5 Hz to 9.5 Hz. Applied across all latency-critical modules, SIM cut average perception-to-decision latency from 521.91 ms to 290.26 ms, reducing emergency braking distance at 40 mph (64 km/h) on dry concrete by 13.6 ft (4.14 m).
翻译:确保高速自动驾驶车辆的安全性需要快速的控制环路以及从感知到执行之间严格受限的延迟。许多开源自动驾驶系统依赖于ROS 2中间件;当多个传感器和控制节点共享一个计算单元时,ROS 2及其DDS传输层会带来显著的(反)序列化、复制和发现开销,从而缩减了可用的时间预算。我们提出了Sensor-in-Memory (SIM),这是一种专为自动驾驶车辆主机内流水线设计的共享内存传输机制。SIM将传感器数据保持在原生内存布局中(例如 cv::Mat, PCL),使用无锁有界双缓冲区(覆写旧数据以优先保证数据新鲜度),并可通过四行代码集成到ROS 2节点中。与传统中间件不同,SIM与ROS 2并行运行,并针对数据新鲜度和最低延迟优先于保证完整性的应用场景进行了优化。SIM提供序列号、写入端心跳信号和可选的校验和,以确保顺序性、活跃性和基本完整性。在NVIDIA Jetson Orin Nano平台上,与ROS 2的零拷贝传输(如FastRTPS和Zenoh)相比,SIM将数据传输延迟降低了高达98%,平均延迟降低了约95%,并将95/99百分位尾部延迟降低了约96%。在一辆运行Autoware.Universe的生产就绪的L4级车辆上进行测试时,SIM将定位频率从7.5 Hz提高到了9.5 Hz。在所有延迟关键模块中应用SIM后,平均感知到决策的延迟从521.91 ms降至290.26 ms,在干燥混凝土路面上以40 mph(64 km/h)速度行驶时,紧急制动距离缩短了13.6英尺(4.14米)。