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传输机制会带来显著的(反)序列化、复制和发现开销,从而压缩了可用时间预算。本文提出传感器内存内传输(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米)。