High CPU Usage When Running Dual ZED2i Cameras via ROS1 – Optimization Suggestions?

Hi everyone,

We are currently operating two ZED2i cameras in a ROS1 (Noetic) environment using the following setup, and we’ve noticed unexpectedly high CPU utilization (around 20~25%) even with relatively default settings. I’m hoping to get some insights into potential optimizations.


:wrench: System Configuration

Hardware:

  • 2x ZED2i cameras (connected via 10m USB repeater cables)
  • Intel Core i7-12700 (12-core, 2.1GHz, 25MB cache)
  • NVIDIA RTX 4060 8GB
  • 2x DDR5 4800MHz SODIMM
  • USB 3.0 direct connection to the industrial PC motherboard

Software:

  • Ubuntu 20.04
  • ROS1 Noetic
  • ZED SDK 4.1.3
  • CUDA 12.5 / Driver 555.42.02
  • Camera settings: HD2K resolution with Neural Depth enabled

:package: ROS Integration Method

We’re launching each camera using this custom wrapper pattern:

<!--zed_connector_for_multi-->
<launch>
    <arg name="publish_urdf"         default="false" />

    <!-- CAMERA connect info. -->
    <arg name="node_name"          default="ZED" />
    <arg name="serial_number"      default="12345678" /> 
    <arg name="camera_model"       default="zed2i" />
    <arg name="camera_name"        default="up0" />

    <group ns="$(arg camera_name)">
        <include file="$(find zed_wrapper)/launch/include/zed_camera_mod.launch">
            <arg name="serial_number"       value="$(arg serial_number)" />
            <arg name="camera_name"         value="$(arg camera_name)" />
            <arg name="node_name"           value="$(arg node_name)" />
            <arg name="camera_model"        value="$(arg camera_model)" />
            <arg name="publish_urdf"        value="$(arg publish_urdf)" />
            <arg name="publish_tf"          value="false" />
            <arg name="camera_id"           value="0" />
        </include>
    </group>
</launch>
----------------------------------------------------------------------------------------------------------------------------------------------------
<include file="$(find zed_wrapper)/launch/zed_connector_for_multi.launch">
  <arg name="camera_name" value="$(arg loc1)"/>
  <arg name="serial_number" value="$(arg serial_number1)"/>
</include>
<include file="$(find zed_wrapper)/launch/zed_connector_for_multi.launch">
  <arg name="camera_name" value="$(arg loc2)"/>
  <arg name="serial_number" value="$(arg serial_number2)"/>
</include>

Each zed_connector_for_multi.launch instance passes args into zed_camera_mod.launch with default settings except publish_tf:=false.

We then subscribe to both rgb and pointcloud topics, and forward the data through a custom service every 3.3 seconds.


:exclamation:The Problem

Despite using relatively low-frequency ROS usage (every 3.3s), we are observing:

  • ~20–25% CPU utilization consistently across the 12-core CPU
  • This is without any subscribers doing heavy work or visualization (just background publishing)

:raising_hand_man: Question

  • Is this level of CPU usage expected under the above setup?
  • Are there any ZED SDK or ROS launch settings that could reduce CPU load, especially when running two cameras?
  • Would using performance_mode, reducing frame rate/resolution, or launching in a certain sequence help?
  • Would offloading more work to the GPU be possible?

Any suggestions on how to optimize CPU load in a dual ZED2i + ROS1 system would be greatly appreciated!

Thanks in advance for your support. :pray:

Hi @MarkdDk
Welcome to the StereoLabs community.

First of all, I would like to recommend upgrading to ROS 2 for two reasons:

  1. ROS Noetic is going EOL in 8 days
  2. The ZED ROS Wrapper is no more maintained and we are not upgrading it with the latest new ZED SDK features

Even if you are not subscribing to topics, if the depth mode is different from NONE the ZED SDK performs depth processing at the grab rate to retrieve camera position information. So this CPU load is expected when using two cameras

What features do you need?

What are you referring to?

What do you mean?

1 Like

Thank you for your response.
I have a few follow-up questions:

  1. I noticed that the frame rate always seems to be fixed at 15 FPS.
    Is there a way to reduce it to 5 Hz operation?
  2. Is it possible to retrieve image and depth data using a trigger-based method instead of continuous streaming mode?

This is not possible with the ZED ROS Wrapper. It’s possible with the ZED ROS2 Wrapper.

No, this feature is not provided by the camera.

1 Like