Hi all. I have some questions about Argus library, probably it’s more to NVIDIA people.
First question, let the task be “to receive a frame from a camera to GPU memory with minimal delay”, is the Argus library the fastest method?
Next, I’m trying to compile and run minimal Argus program, after flashing latest JetPack, I see the library at /usr/lib/aarch64-linux-gnu/tegra/libargus.so and headers at /home/nvidia/tegra_multimedia_api/argus/include/ – is it correct to use them from here?
The program is minimal:
printMsg("Argus: Begin");
using namespace Argus;
UniqueObj<CameraProvider> cameraProvider(CameraProvider::create());
ICameraProvider* iCameraProvider = interface_cast<ICameraProvider>(cameraProvider);
REQUIRE_MSG(iCameraProvider, STR("Failed to establish libargus connection"));
printMsg("Argus OK");
When I run it from a user different from “nvidia” user, the output is:
Error: Can't initialize nvrm channel
Error: Can't initialize nvrm channel
Couldn't create ddkvic Session: Cannot allocate memory
main() begin
Argus: Begin
NvIspCtrlInitialize: Error opening ctrl node /dev/nvhost-ctrl-isp (Permission denied)Error: Can't initialize nvrm channel
SCF: Error ResourceError: (propagating from src/services/capture/CaptureServiceDeviceIsp.cpp, function open(), line 167)
SCF: Error ResourceError: (propagating from src/services/capture/CaptureServiceDevice.cpp, function initialize(), line 314)
SCF: Error InvalidState: Isp is not opened (in src/services/capture/CaptureServiceDeviceIsp.cpp, function close(), line 195)
SCF: Error ResourceError: (propagating from src/services/capture/CaptureService.cpp, function startService(), line 937)
SCF: Error InvalidState: Queue mutex not initialized (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamerautils/inc/QueueImpl.h, function dequeue(), line 227)
SCF: Error ResourceError: (propagating from src/components/ServiceHost.cpp, function startServices(), line 120)
SCF: Error ResourceError: (propagating from src/api/CameraDriver.cpp, function initialize(), line 153)
SCF: Error ResourceError: (propagating from src/api/CameraDriver.cpp, function getCameraDriver(), line 100)
(Argus) Error ResourceError: (propagating from src/api/GlobalProcessState.cpp, function createCameraProvider(), line 204)
Failed to establish libargus connection
Here the problems are:
- A capture library prints errors to stdout/stderr -- it's better to return error codes or at least throw exceptions so the main application can handle them.
- The library runs before main() function, not good.
- What do these errors mean?
When I run it via sudo OR from “nvidia” user without sudo, it gives:
main() begin
Argus: Begin
OFParserGetVirtualDevice: virtual device driver node not found in proc device-tree
OFParserGetVirtualDevice: virtual device driver node not found in proc device-tree
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16LoadOverridesFile: looking for override file [/data/nvcam/settings/e3326_front_P5V27C.isp] 6/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/e3326_front_P5V27C.isp] 7/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/e3326_front_P5V27C.isp] 8/16---- imager: No override file found. ----
Argus OK
This one looks better (and the pointer is not null), but again it tells us that something is wrong.
How to fix it? It’s fresh JetPack install.