NVIDIA-AI-IOT / argus_camera

Simple Python / C++ interface to CSI camera connected to NVIDIA Jetson.
BSD 3-Clause "New" or "Revised" License
81 stars 39 forks source link

Build issue on Jetson Xavier #3

Open Dou8856 opened 5 years ago

Dou8856 commented 5 years ago

I got following issue on Xavier when I ran Make. No error after ran "cmake ..". I take the camera directly from TX2 DevKit and directly plugged it in.

Build error: /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp: In static member function ‘static ArgusCamera ArgusCamera::createArgusCamera(const ArgusCameraConfig&, int)’: /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp:98:105: error: no matching function for call to ‘Argus::ICaptureSession::createOutputStreamSettings(NULL)’ s = UniqueObj(iCaptureSession->createOutputStreamSettings(NULL)); ^ In file included from /home/nvidia/tegra_multimedia_api/include/Argus/Argus.h:123:0, from /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp:3: /home/nvidia/tegra_multimedia_api/include/Argus/CaptureSession.h:152:35: note: candidate: virtual Argus::OutputStreamSettings Argus::ICaptureSession::createOutputStreamSettings(const Argus::StreamType&, Argus::Status) virtual OutputStreamSettings createOutputStreamSettings(const StreamType& type, ^~~~~~ /home/nvidia/tegra_multimedia_api/include/Argus/CaptureSession.h:152:35: note: no known conversion for argument 1 from ‘long int’ to ‘const Argus::StreamType&’ /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp:214:10: error: invalid use of incomplete type ‘class Argus::IStream’ iStream->waitUntilConnected(); ^~ In file included from /home/nvidia/tegra_multimedia_api/include/Argus/Argus.h:116:0, from /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp:3: /home/nvidia/tegra_multimedia_api/include/Argus/Types.h:82:7: note: forward declaration of ‘class Argus::IStream’ class IStream; ^~~ /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp: In destructor ‘virtual ArgusCamera::~ArgusCamera()’: /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp:264:12: error: invalid use of incomplete type ‘class Argus::IStream’ iStream->disconnect(); ^~ In file included from /home/nvidia/tegra_multimedia_api/include/Argus/Argus.h:116:0, from /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp:3: /home/nvidia/tegra_multimedia_api/include/Argus/Types.h:82:7: note: forward declaration of ‘class Argus::IStream’ class IStream; ^~~ /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp: In member function ‘virtual int ArgusCamera::read(uint8_t)’: /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp:316:34: error: no matching function for call to ‘EGLStream::NV::IImageNativeBuffer::createNvBuffer(Argus::Size2D&, NvBufferColorFormat, NvBufferLayout, Argus::Status)’ NvBufferLayout_Pitch, &status); ^ In file included from /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp:4:0: /home/nvidia/tegra_multimedia_api/include/EGLStream/NV/ImageNativeBuffer.h:89:17: note: candidate: virtual int EGLStream::NV::IImageNativeBuffer::createNvBuffer(Argus::Size2D, NvBufferColorFormat, NvBufferLayout, EGLStream::NV::Rotation, Argus::Status) const virtual int createNvBuffer(Argus::Size2D size, ^~~~~~ /home/nvidia/tegra_multimedia_api/include/EGLStream/NV/ImageNativeBuffer.h:89:17: note: no known conversion for argument 4 from ‘Argus::Status’ to ‘EGLStream::NV::Rotation’ In file included from /home/nvidia/tegra_multimedia_api/include/Argus/Argus.h:116:0, from /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp:3: /home/nvidia/tegra_multimedia_api/include/Argus/Types.h: In instantiation of ‘TheInterface Argus::interface_cast(Argus::InterfaceProvider) [with TheInterface = Argus::IStream]’: /home/nvidia/tegra_multimedia_api/include/Argus/Types.h:437:40: required from ‘TheInterface Argus::interface_cast(const Argus::UniqueObj&) [with TheInterface = Argus::IStream; TObject = Argus::OutputStream]’ /home/nvidia/Emily_Source/argus_camera/src/ArgusCamera.cpp:118:57: required from here /home/nvidia/tegra_multimedia_api/include/Argus/Types.h:343:79: error: incomplete type ‘Argus::IStream’ used in nested name specifier return static_cast<TheInterface*>(obj ? obj->getInterface(TheInterface::id()): 0);


CMakeFiles/argus_camera.dir/build.make:62: recipe for target 'CMakeFiles/argus_camera.dir/src/ArgusCamera.cpp.o' failed
make[2]: *** [CMakeFiles/argus_camera.dir/src/ArgusCamera.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/argus_camera.dir/all' failed
make[1]: *** [CMakeFiles/argus_camera.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
LMSAas commented 5 years ago

Does the argus_camera software tool work?

Dou8856 commented 5 years ago

Hi,

Do you mean the argus_camera.py python program? No, it doesn't work.

I followed the build instruction below:


sudo apt-get install cmake python-pip swig cd argus_camera mkdir build cd build cmake .. make -j4 // where I got the reported error sudo make install cd .. sudo python setup.py install

Dou8856 commented 5 years ago

image

LMSAas commented 5 years ago

It looks like you have not installed libargus. As far as I remember you can include it on system installation.

Dou8856 commented 5 years ago

Hi, I am pretty sure the libargus was correctly installed on Jetson Xavier, since I could build and run the samples image

LMSAas commented 5 years ago

OK. Then I don't think I can help you. I have not tested this on Xavier, and don't have one available.

andrewkyngdon commented 5 years ago

I'm experiencing the same problem on a TX2 (JetPack 4.2, Ubuntu 18.04 LTS). Like Dou8856 the samples work for me.

mikolez commented 5 years ago

I think this error pops out because the code is based on the older version of tegra_multimedia_api (as I understood it is R28.2.1, not entirely sure though). The latest versions of the api differ a bit from that one and that is why code does not compile. There are two solutions that I think of now: 1) one is to downgrade to the older version of the api (R28.2.1) and try to compile the code again or 2) change the source code a bit to fit the current version of the api. I am actually trying to do the latter one, will update you if I am successful.

marvision-ai commented 5 years ago

@mikolez Any luck on your progress?

jfinken commented 4 years ago

It appears this person's fork is ahead of master. It builds the cpp code and the python bindings on a Xavier running L4T 32.2.1 (JetPack 4.2.2) at any rate.

https://github.com/idlerun/argus_camera

Great opportunity for @idlerun to create a very helpful PR!

idlerun commented 4 years ago

@jfinken My fork compiles correctly with the latest versions, but unfortunately it seems like there is some missing native handle cleanup. I was getting errors every odd time trying to spin up a test app. Kinda put it on the back burner for the time being while working on other things :-\