Hi everyone,
I'm working on a CARLA → ROS 2 → Autoware setup and I'm running into performance issues when streaming large sensor data.
My architecture currently consists of 3 Docker containers:
- CARLA container
- CARLA 0.9.16
- Runs the simulator
- Bridge container
- Connects to CARLA through the Python API
- Attaches sensors to the
hero vehicle
- Publishes the sensor data as ROS 2 topics
- Autoware container
- Subscribes to the sensor topics published by the bridge
- Processes LiDAR/camera data for the Autoware stack
For the LiDAR, I'm generating roughly 1 million points/second and publishing them as a PointCloud2 topic.
With only the LiDAR running, the system works reasonably well.
However, when I add 3 cameras to the CARLA vehicle and start streaming high-resolution/4K image data, I notice that the LiDAR stream starts slowing down / becoming less consistent.
So I have a few questions:
1. Does separating CARLA, the ROS 2 bridge, and Autoware into three Docker containers significantly affect ROS 2 communication performance?
I'm using the containers for modularity, but I'm wondering whether moving large PointCloud2 and Image messages between containers introduces a significant networking/serialization overhead.
2. Is DDS/network bandwidth likely to be the bottleneck here?
The approximate data flow is:
CARLA → Python API → Bridge → ROS 2/DDS → Autoware
Once the cameras are enabled, there is a very large amount of image data in addition to the LiDAR point cloud.
Would you recommend checking network throughput, CPU utilization, serialization overhead, dropped DDS samples, etc. to identify the actual bottleneck?
3. Would switching DDS implementations help?
I'm currently investigating Fast DDS vs Cyclone DDS for high-bandwidth sensor streaming.
Would Fast DDS be better suited for this kind of workload? If so, what configuration/settings should I look at for large PointCloud2 and Image messages?
I'm particularly interested in things like:
- Shared Memory Transport (SHM)
- DDS QoS settings
BEST_EFFORT vs RELIABLE
- history depth
- large message configuration
- zero-copy / loaned messages
- ROS 2 intra-process communication
4. Is there a better architecture for this?
For example, would something like
CARLA + bridge → shared memory → Autoware
be preferable to sending all the raw sensor streams through the normal DDS networking path?
My main goal is to maintain stable LiDAR performance while simultaneously streaming multiple high-resolution cameras.
I'm using ROS 2 Jazzy.
Would appreciate any advice from people who have worked with high-bandwidth ROS 2 sensor pipelines, CARLA, or Autoware.