Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.10.0
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other
Target Operating System
Linux
QNX
other
Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other
SDK Manager Version
2.1.0
other
Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other
Issue Description
Hello,
I’m working for the application for conveying camera image data through ROS, and I modified samples/nvmedia/nvsipl/test/camera/CNvSIPLConsumer.hpp
to see the feasibility of copying an image data from the NvSciBufObj
.
(I used to use NvMediaImageGetBits
in DRIVE OS 5.2.6.0 and need similar function)
What I did on the file is, just inserting some functions into OnFrameAvailable
funciton since I found that WriteBufferToFile
in CFileWriter.hpp
has the flow I wanted to have.
I added the code based on the CFileWriter.hpp
like the flow below. (I am sharing the simplified code herewith just to show the flow)
NvSciBufObj buffer = pNvMBuffer->GetNvSciBufImage();
SIPLStatus status = PopulateBufAttr(buffer, rawBufAttrs);
status = GetBuffParams(rawBufAttrs, &xScalePtr, &yScalePtr, &bytesPerPixelPtr,&numSurfaces,&isPackedYUV);
NvSciError sciErr = NvSciBufObjGetPixels(buffer, NULL, (void **)pBuff, size, pBuffPitches);
and then updated size
, pBuffPitches
, pBuff
based on the code in CFileWriter.hpp
After the code modification, I confirmed that the inserted code is working by print the related values out like,
size = 1048576, planeCount = 2, width [960][480], height [540][270], pitch [1024][1024], bpp [8][16]
height = 540, yScalePtr[0] = 1.00, pBuffPitches[0] = 960, size[0] = 518400, imageSize 518400,
__________ pBuff[0] = 0xffff4817ca50, buffIter = 0xffff481fb350
But the return value of NvSciBufObjGetPixels
is 256 which represents BadParameter
.
I checked the error cases in [NVIDIA DRIVE OS Linux SDK API Reference: NvSciBuf Object APIs | NVIDIA Docs](https://API reference) but couldn’t find the root cause.
Can you please help me out for this issue?