When building real-time robotic systems, every millisecond counts. In this post, I’ll share my experience comparing CycloneDDS and FastDDS middleware implementations in ROS2.
The Problem
High-frequency sensor loops (e.g., LiDAR at 20Hz, IMU at 100Hz) require minimal latency between publisher and subscriber nodes. The default DDS configuration often isn’t optimal.
Key Findings
After extensive benchmarking with our warehouse AMR fleet, here are the key takeaways:
- CycloneDDS showed 15% lower latency for small messages (under 1KB)
- FastDDS handled large point clouds more efficiently
- Both require manual QoS tuning for production workloads
The Math Behind It
The expected latency can be modeled as:
Where network latency depends on your middleware configuration:
Conclusion
There’s no one-size-fits-all solution. Profile your specific use case before choosing a middleware.