orbbec / OrbbecSDK-K4A-Wrapper

This repo is forked from Azure-kinect-Sensor-SDK,contain the K4A wrapper for OrbbecSDK.
https://www.orbbec.com/
MIT License
34 stars 7 forks source link

k4a_image_create - Alloc frame buffer failed! #63

Open moskitoo opened 5 months ago

moskitoo commented 5 months ago

Hi there!

We're currently in the process of replacing Azure Kinect with Femto Bolt in our ROS package. Previously, the package was functioning smoothly. However, we encountered some errors upon introducing the orbbec k4a wrapper.

Problem Overview:

In general, our node subscribes to topics published by the Azure Kinect ROS driver. It then converts these messages to cv::Mat and subsequently to k4a_image_t for further operations. We've followed the code provided here.

Error Encountered:

The error arises during the conversion process from cv::Mat to k4a_image_t using k4a_image_create. The error message is as follows:

[04/18 14:52:21.664740][warning][201271][FrameBufferManager.cpp:43] Alloc frame buffer failed! Out of max size! require=7.911MB, total usage: allocated=2040.508MB, max limit=2048.000MB [04/18 14:52:21.664890][warning][201271][FrameBufferManager.cpp:82] allocBuffer failed! Will retry after release idle memory on FrameMemoryPool [04/18 14:52:21.664929][warning][201271][FrameBufferManager.cpp:43] Alloc frame buffer failed! Out of max size! require=7.911MB, total usage: allocated=2040.508MB, max limit=2048.000MB [04/18 14:52:21.664969][critical][201271][FrameBufferManager.cpp:88] Alloc frame buffer failed! size=8294831 [04/18 14:52:21.665006][warning][201271][ObException.hpp:40] Alloc frame buffer failed! size=8294831 [2024-04-18 14:52:21.665] [error] [t=201271] /home/orbbec/Desktop/daiyin/OrbbecSDK-K4A-Wrapper/src/orbbec/ob_type_helper.cpp (21): check_ob_error(). Inner Orbbec SDK error: Alloc frame buffer failed! size=8294831, function: ob_create_frame, exception: 7

Request for Assistance:

We're currently seeking guidance on how to resolve this issue. Any insights or suggestions would be greatly appreciated.

Thank you!

zhonghong322 commented 4 months ago

Can you paste the code on how to call k4a_image_create and how to convert cv::Mat to k4a_image_t?