Encountered a problem developing the camera pipeline where allocated buffers aren't being reused. This effectively means we can't capture more than ~

Please provide the following info (tick the boxes after creating this topic):
Software Version


Target Operating System

Hardware Platform

DRIVE AGX Orin Developer Kit (940-63710-0010-200)

SDK Manager Version

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager

describes a bug in the camera driver causing it to stop receiving images after we use all of the buffers allocated for the INvSIPLCamera instance one time. In other words, the buffers that we allocate for SIPL’s ISP pipelines are never re-used / properly marked as re-usable.

Below is a high-level outline of how our driver is structured:

Initialization of camera instance & memory

  1. Load platform configuration

  2. Create INvSIPLCamera instance

  3. Set platform config

  4. Set pipeline config

  5. Init()

  6. Allocate memory for the ISP pipelines (currently we allocate a queue of 10 images for each ISP pipeline that is enabled in the pipeline configuration. Our pipeline configuration is enabling outputs from ICP and ISP0 only)

  7. The buffers are allocated via NvSciBuf

  8. Each buffer is of type NvSciBufType_Image

  9. Each buffer has NvSciBufAccessPerm_ReadWrite

  10. ISP0 buffers are also assigned NvSciBufGeneralAttrKey_NeedCpuAccess = true and NvSciBufGeneralAttrKey_EnableCpuCache = true

1. ICP buffers are not assigned these permissions. It’s my understanding from `nvsipl_camera` that ICP does not need these attributes?
  1. Buffers also have image attributes that were received from INvSIPLCamera::GetImageAttributes()

  2. Buffers are registered with camera instance via INvSIPLCamera::RegisterImages()

  3. NITO file from Quanta is loaded & registered with camera instance via INvSIPLCamera::RegisterAutoControlPlugin()

  4. Camera instance is started via INvSIPLCamera::Start()

Summary questions

  1. Other than marking a buffer as finished via INvSIPLClient::INvSIPLBuffer::Release(), what else needs to be done so that SIPL recognizes that a buffer can be reused?

  2. Has there been any thought to include a method to access the reference count of an INvSIPLClient::INvSIPLBuffer? There are methods to AddRef() and Release(), but no way to see what the value of the current ref count is.

  3. Are we supposed to be accessing the images from the ICP INvSIPLFrameCompletionQueue? Do we need to Get() them and mark them as released? Is it okay to just access the ISP0 queue?

  4. If a buffer is never accessed via Get() its reference count would be 0 and it would be available for reuse by SIPL, correct?

  5. If ISP1 and ISP2 outputs are disabled, we don’t need to do anything else with them, right?

  6. Do we need to integrate NvSciSync in order to access a buffer and write it to a ROS message? I assume if we were doing inter-process communication or sharing buffers between threads to do other processing we’d need NvSciSync to help. Is it necessary for just reading the raw data in the same thread that’s calling INvSIPLFrameCompletionQueue::Get()? What purpose is it serving in that case?

Thank you for describing the bug and providing an outline of your camera driver structure. It’s important to note that you should always upgrade to the latest release, which is currently 6.0.6. Additionally, I recommend referring to SIPL Sample Applications provided for your implementation. They can serve as a helpful reference and provide guidance on how to handle buffers and other aspects of the camera driver.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.