Why does FPS gradually increase after several hours using ZED X with ZED Box (Orin NX 16GB) and ROS 2?

Hi

I’m using ZED X camera on a Jetson Orin NX 16gb.
In my C++ application (using rclcpp), I measure the frame rate by counting successful grab() calls and retrieving both the left image and depth (retrieveImage, retrieveMeasure) every frame.

Initially, the system runs at around 30 FPS, but after 2–3 hours of continuous operation, the FPS increases to around 40.

What could be causing this gradual increase in frame rate over time?

Equipment

  • ZED X
  • ZED Link Mono
  • ZED Box Orin NX 16gb (25W)

SDK version

  • jetpack version : 6.0
  • zed sdk : 4.2.5
  • cuda : 12.2
  • zed Mono sdk : 1.3.0

Excerpt from my code

InitParameters init_params;
init_params.input.setFromCameraID(0);
init_params.camera_resolution = RESOLUTION::HD1080;
init_params.camera_fps = 60;
init_params.depth_mode = DEPTH_MODE::PERFORMANCE;
init_params.coordinate_units = UNIT::MILLIMETER;
init_params.depth_minimum_distance = 0.2 * 1000;
init_params.depth_maximum_distance = 60 * 1000;
init_params.svo_real_time_mode = false;
init_params.async_image_retrieval = false;
init_params.enable_image_enhancement = false;
init_params.camera_image_flip = sl::FLIP_MODE::OFF;
init_params.sdk_verbose = false;
init_params.enable_image_validity_check = false;
init_params.sensors_required = false;
init_params.sdk_gpu_id = 0;

RuntimeParameters runtimeparameters;
runtimeparameters.enable_fill_mode = false;
runtimeparameters.confidence_threshold = 95;

int frame_count = 0;
auto frame_start = std::chrono::steady_clock::now();

while(thread_running == true && rclcpp::ok())
{
  if(zed.grab(runtimeparameters) == ERROR_CODE::SUCCESS)
  { 
    // zed raw data
    zed.retrieveImage(left_img, VIEW::LEFT);
    // depth
    zed.retrieveMeasure(depth_img, sl::MEASURE::DEPTH);
    
    // cout << zed.getCurrentFPS() << "\n"<< endl;
    
    auto frame_end = std::chrono::steady_clock::now();

    if (std::chrono::duration_cast<std::chrono::milliseconds>(frame_end - frame_start).count() > 1000)
    { 
      RCLCPP_INFO(this->get_logger(), "[zed grab check] 1000ms = %d frame [%d]\n", frame_count, std::chrono::duration_cast<std::chrono::milliseconds>(frame_end - frame_start).count());
      frame_count = 0;
      frame_start = frame_end;           
    }
    else
    {
      frame_count++;
    }    
  }
}

Ros2 start

Ros2 2hour after

Hi @yunjik
Welcome to the Stereolabs community.

Normally, other users complain of the contrary :wink:

It’s unusual. What’s the grab frame rate setting?
I guess it’s something related to the DDS communication.
What DDS middleware are you using? Have you set up the system by following our guide?