roboception / rc_genicam_api Goto Github PK
View Code? Open in Web Editor NEWRoboception convenience layer around GenICam and GigE Vision.
License: Other
Roboception convenience layer around GenICam and GigE Vision.
License: Other
Usually, i know ip address of a device instead of deviceId , bu now i must open the device by deviceid or index then i can get the ipaddress , how can i open a deivce by ipaddress instead of deivceid?
Wrong message
I get
$ gc_stream eno1:00_0c_d4_12_32_2b
Exception: Stream::open(): Write max packet size failed with 0x8002
with this UV camera
Vendor: JAI Ltd., Japan
Model: BM-141GE
Regarding the message I found this in
http://www.emva.org/wp-content/uploads/GenCP_1.1.pdf
0x8002
GENCP_INVALID_PARAMETER
At least one command parameter
of CCD or SCD is invalid or out of range.
What does this mean?
If the IP address is incorrect then access status of the device is "busy", its real IP and mac cannot be obtained at this time. How can we programmatically know which network port it belongs to and display it on the UI with a friendly prompt?
Usually , i know ipaddress instead of deviceid , but now i list the devices by interface and i can not get information about ipaddress by the device reference before open it , how can i get ipaddress before open device ?
ICommand::Execute() is declared as void, however it tries to return a value... see below, file ICommand.h:
/--------------------------------------------------------/
// ICommand
/--------------------------------------------------------/
//! Execute the command
virtual void Execute(bool Verify = true)
{
if(ref::m_Ptr)
return ref::m_Ptr->Execute(Verify);
else
throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
}
when I compile the project on cmake 3.17.2 , I meet some problems 👍
CMake Error at CMakeLists.txt:119 (add_library):
No SOURCES given to target: rc_genicam_api_static
Hi,
I have a hikrobot MV-CS050-10GC, connect to laptop via ethernet,
compile from source OK
mkdir build & cd build
cmake ..
sudo make install
gc_info OK
but gc_stream return Incomplete buffer received
I set mtu 9000 alreay, and can see the image when use hikrobot's MVS client.
$ gc_stream K638xxxx
Package size: 9000
Incomplete buffer received
Incomplete buffer received
Incomplete buffer received
Incomplete buffer received
Incomplete buffer received
Received buffers: 5
Incomplete buffers: 5
Buffers per second: 9.36
$ gc_info -l
Transport Layer /home/max/ground_map/camera/rc_genicam_api/baumer/Ubuntu-16.04/x86_64//libbgapi2_gige.cti_2.9.22968.22969
Vendor: Baumer
Model: bgapi2_gige
Vendor version: 2.9.22968.22969
TL type: GEV
Name: libbgapi2_gige.cti
Pathname: /home/max/ground_map/camera/rc_genicam_api/baumer/Ubuntu-16.04/x86_64//libbgapi2_gige.cti
Display name: Baumer GEV TL
GenTL version 1.5
Interface enp46s0
Display name: enp46s0
TL type: GEV
Device devicemodul34_bd_20_0f_57_8a
Vendor: Hikrobot
Model: MV-CS050-10GC
TL type: GEV
Display name: MV-CS050-10GC
User defined name:
Access status: ReadWrite
Serial number: K638xxxx
Version:
TS Frequency: 0
Interface wlp0s20f3
Display name: wlp0s20f3
TL type: GEV
Interface br-bee81386d075
Display name: br-bee81386d075
TL type: GEV
Interface br-1147761da213
Display name: br-1147761da213
TL type: GEV
Interface docker0
Display name: docker0
TL type: GEV
Transport Layer /home/max/ground_map/camera/rc_genicam_api/baumer/Ubuntu-16.04/x86_64//libbgapi2_usb.cti_2.9.22669.22969
Vendor: Baumer
Model: bgapi2_usb
Vendor version: 2.9.22669.22969
TL type: U3V
Name: libbgapi2_usb.cti
Pathname: /home/max/ground_map/camera/rc_genicam_api/baumer/Ubuntu-16.04/x86_64//libbgapi2_usb.cti
Display name: Baumer U3V TL
GenTL version 1.5
Interface USB
Display name: USB HOST
TL type: U3V
gc_stream 2F01F38YAK00044
Exception: Node is not writable. : AccessException thrown in node 'AcquisitionStart' while calling 'AcquisitionStart.Execute()' (file 'CommandT.h', line 61)
When I use baumer Camera Explorer,it`s look like work.
unbutu16.04 x64
device info got from gc_info
TL type: GEV
Device devicemodul3c_ef_8c_94_ba_a4
Vendor: Machine Vision
Model: A5501MG20
TL type: GEV
Display name: Camera0
Access status: ReadWrite
Serial number: 2F01F38YAK00044
Version:
TS Frequency: 0
Hello,
Is there a way to save disparity values instead of the image ? I guess there is some loss of information when doing the color mapping and I want to avoid that.
Thanks !
Hi, I just tried success in Ubuntu18.04 with Basler USB camera and libbgapi2_usb.cti. But when I install rc_genicam in ubuntu 18.04 docker, I can't get transport layer in docker.
This is in x86 ubuntu18.04 host with gc_info -l
Transport Layer /usr/local/lib/rc_genicam_api/libbgapi2_gige.cti_2.9.22968.22969
Vendor: Baumer
Model: bgapi2_gige
Vendor version: 2.9.22968.22969
TL type: GEV
Name: libbgapi2_gige.cti
Pathname: /usr/local/lib/rc_genicam_api/libbgapi2_gige.cti
Display name: Baumer GEV TL
GenTL version 1.5
Interface eno2
Display name: eno2
TL type: GEV
Interface docker0
Display name: docker0
TL type: GEV
Interface veth00d9670
Display name: veth00d9670
TL type: GEV
Transport Layer /usr/local/lib/rc_genicam_api/libbgapi2_usb.cti_2.9.22669.22969
Vendor: Baumer
Model: bgapi2_usb
Vendor version: 2.9.22669.22969
TL type: U3V
Name: libbgapi2_usb.cti
Pathname: /usr/local/lib/rc_genicam_api/libbgapi2_usb.cti
Display name: Baumer U3V TL
GenTL version 1.5
Interface USB
Display name: USB HOST
TL type: U3V
Device 267601C9DC7B
Vendor: Basler
Model: acA1920-150uc
TL type: U3V
Display name: acA1920-150uc
User defined name:
Access status: ReadWrite
Serial number: 40011777
Version:
TS Frequency: 0
But in docker container only see
Transport Layer /usr/local/lib/rc_genicam_api/libbgapi2_gige.cti_2.9.22968.22969
Vendor: Baumer
Model: bgapi2_gige
Vendor version: 2.9.22968.22969
TL type: GEV
Name: libbgapi2_gige.cti
Pathname: /usr/local/lib/rc_genicam_api/libbgapi2_gige.cti
Display name: Baumer GEV TL
GenTL version 1.5
Interface eno2
Display name: eno2
TL type: GEV
Interface docker0
Display name: docker0
TL type: GEV
Interface veth00d9670
Display name: veth00d9670
TL type: GEV
DOCKERFILE below
FROM ubuntu:18.04
RUN apt update
RUN DEBIAN_FRONTEND=noninteractive \
apt-get install -y --fix-missing \
apt-get install -y --fix-missing \
wget \
unzip \
git \
vim \
cmake \
build-essential
RUN echo 'export GENICAM_GENTL64_PATH=/usr/local/lib/rc_genicam_api' >> ~/.bashrc
WORKDIR /home/
RUN git clone https://github.com/roboception/rc_genicam_api.git
WORKDIR /home/rc_genicam_api
RUN mkdir build
WORKDIR /home/rc_genicam_api/build
RUN cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
RUN make -j8
RUN make install
RUN ldconfig
Hi there,
I observe weird behaviour, when using the command line tool to query multiple components from my rc_visard.
I get only the first Enabled component. So when Intensity is activated there is only Intensity returned. All other activated components are ignored. If disparity is the first i only get this one.
Screenshot:
I expected to get Intensity, Disparity and Confidence, but got only the Intensity Image.
If i do n=100 and i'm lucky there is a disparity Image inbetween all the intensity images. I have done all Network-Optimizations and net_perf_check.sh doesn't complain about anything.
A few days ago it worked and saved all enabled images:
I hope somebody knows what causes this behaviour.
With kind regards
derEskimo
Hello,
Using gc_info able to query the camera details.
But when gc_stream is used, images are not getting saved.
$ ./gc_stream 22034422
Package size: 1500
Received buffers: 5
Incomplete buffers: 0
Buffers per second: 1.89
So added the below code for debug:
diff --git a/rc_genicam_api/buffer.cc b/rc_genicam_api/buffer.cc
index 7a2afea..eacb634 100644
--- a/rc_genicam_api/buffer.cc
+++ b/rc_genicam_api/buffer.cc
@@ -71,7 +71,8 @@ inline bool getBufferBool(const std::shared_ptr &gentl,
if (stream != 0 && buffer != 0)
{
return ret != 0;
$ ./gc_stream 22034422
Package size: 1500
0
-1014
0
-1014
0
-1014
0
-1014
0
-1014
Received buffers: 5
Incomplete buffers: 0
Buffers per second: 1.89
**Please note that, -1014 is GC_ERR_NOT_AVAILABLE.
$ ./gc_info -l
Transport Layer ProducerGEV.cti
Vendor: Basler
Model: GEV GenTL Producer
Vendor version: 1.0.0.0
TL type: GEV
Name: ProducerGEV-1.3.2.cti
Pathname: /opt/pylon5/lib64/gentlproducer/gtl/ProducerGEV-1.3.2.cti
Display name: Basler GEV GenTL Producer
GenTL version 1.5
Interface Basler GEV GenTL Interface Module
Display name: GigE Vision
TL type: GEV
Device Basler acA1300-30gc (22034422)
Vendor: Basler
Model: acA1300-30gc
TL type: GEV
Display name: acA1300-30gc (22034422)
User defined name:
Access status: Unknown
Serial number: 22034422
Version: 104846-20
TS Frequency: 0
The std::string ret address is passed instead of the buffer tmp.
I am working with a number of different GigE cameras, all of them being GenTL 1.5 producers (IDS, Sentech, etc) and was trying out rc_genicam_api with them. I ran into an issue with the Sentech models, where gc_stream doesn't seem to be able to receive any data from the camera. The strange thing is, I do see the data coming through on wireshark (as shown in the image below). It looks like the rcg::Stream::grab() method is timing out without receiving any events ("Cannot grab images" is emitted along the timeout period).
(ignore the package size: 2900, vs my wireshark payload sizes of 4014. I was playing around with MTU settings to see if they made a difference in this specific run)
I'm using the latest 2.2.0 release, and everything seems to work fine with all of my other cameras from other vendors. It may be worth noting that the Sentech camera is a Pleora device, which I noticed should be supported in this issue: #8.
I've also made sure that the devices are on the same subnet and have used other GigE tools to access the streams of this camera to make sure it is working (aravis, eBUS SDK, IDS's Vision Cockpit, etc).
Any ideas what might be wrong? Hoping this might not be a camera specific issue. Thanks!
Hi,
I just used the library to capture cammer picture in NVIDIA TX2 borad.
And the picture size is 2469888.
It failed to get the correct data when try to get the 200nd picture every time.
However, it run well in windows and VMWARE virtural environment.
Could you show your suggestion?
Thanks
Hello ,Happy New Year for the 2019!
i'm the first time to learn your project. Win10 x64 System, when i using 'cmake' clicked 'Generate' button . It shows this error:
CMake Error at CMakeLists.txt:78 (add_library):
Cannot find source file:CMake Warning (dev) at CMakeLists.txt:41 (add_definitions):
Policy CMP0005 is not set: Preprocessor definition values are now escaped
automatically. Run "cmake --help-policy CMP0005" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such ascmake_minimum_required(VERSION 3.12)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.Configuring done
CMake Error at CMakeLists.txt:78 (add_library):
Cannot find source file:F:/coding/KS_GENICAM/KSGENICAM/project_version.cc
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txxCMake Error at CMakeLists.txt:78 (add_library):
No SOURCES given to target: rc_genicam_api_static
I had tried in Win7 system , it is the same problem. Would you please help me, thanks a lot!
[12/46] /usr/bin/c++ -DGENTL_INSTALL_PATH=\"/home/deepvision/source/repos/vcpkg/packages/rc-genicam-api_x64-linux/debug/lib/rc_genicam_api\" -DINCLUDE_PNG -DPACKAGE_VERSION=\"2.6.1\" -DPACKAGE_VERSION_MAJOR=2 -DPACKAGE_VERSION_MINOR=6 -DPACKAGE_VERSION_PATCH=1 -DPROJECT_VERSION=\"2.6.1\" -DPROJECT_VERSION_INT=20601 -I/home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee -I/home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/x64-linux-dbg -isystem /home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee/genicam/library/CPP/include -fPIC -g -std=gnu++11 -Wall -Wno-unknown-pragmas -MD -MT rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/image_store.cc.o -MF rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/image_store.cc.o.d -o rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/image_store.cc.o -c /home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee/rc_genicam_api/image_store.cc
FAILED: rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/image_store.cc.o
/usr/bin/c++ -DGENTL_INSTALL_PATH=\"/home/deepvision/source/repos/vcpkg/packages/rc-genicam-api_x64-linux/debug/lib/rc_genicam_api\" -DINCLUDE_PNG -DPACKAGE_VERSION=\"2.6.1\" -DPACKAGE_VERSION_MAJOR=2 -DPACKAGE_VERSION_MINOR=6 -DPACKAGE_VERSION_PATCH=1 -DPROJECT_VERSION=\"2.6.1\" -DPROJECT_VERSION_INT=20601 -I/home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee -I/home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/x64-linux-dbg -isystem /home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee/genicam/library/CPP/include -fPIC -g -std=gnu++11 -Wall -Wno-unknown-pragmas -MD -MT rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/image_store.cc.o -MF rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/image_store.cc.o.d -o rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/image_store.cc.o -c /home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee/rc_genicam_api/image_store.cc
/home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee/rc_genicam_api/image_store.cc: In function ‘std::__cxx11::string rcg::{anonymous}::storeImagePNG(const string&, const rcg::Image&, size_t, size_t)’:
/home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee/rc_genicam_api/image_store.cc:541:33: error: invalid conversion from ‘const unsigned char*’ to ‘png_bytep {aka unsigned char*}’ [-fpermissive]
png_write_row(png, p);
^
In file included from /usr/include/png.h:321:0,
from /home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee/rc_genicam_api/image_store.cc:49:
/usr/include/png.h:1646:8: note: initializing argument 2 of ‘void png_write_row(png_structp, png_bytep)’
extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr,
^
[13/46] /usr/bin/c++ -DGENTL_INSTALL_PATH=\"/home/deepvision/source/repos/vcpkg/packages/rc-genicam-api_x64-linux/debug/lib/rc_genicam_api\" -DINCLUDE_PNG -DPACKAGE_VERSION=\"2.6.1\" -DPACKAGE_VERSION_MAJOR=2 -DPACKAGE_VERSION_MINOR=6 -DPACKAGE_VERSION_PATCH=1 -DPROJECT_VERSION=\"2.6.1\" -DPROJECT_VERSION_INT=20601 -I/home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee -I/home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/x64-linux-dbg -isystem /home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee/genicam/library/CPP/include -fPIC -g -std=gnu++11 -Wall -Wno-unknown-pragmas -MD -MT rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/nodemap_out.cc.o -MF rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/nodemap_out.cc.o.d -o rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/nodemap_out.cc.o -c /home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee/rc_genicam_api/nodemap_out.cc
[14/46] /usr/bin/c++ -DGENTL_INSTALL_PATH=\"/home/deepvision/source/repos/vcpkg/packages/rc-genicam-api_x64-linux/debug/lib/rc_genicam_api\" -DINCLUDE_PNG -DPACKAGE_VERSION=\"2.6.1\" -DPACKAGE_VERSION_MAJOR=2 -DPACKAGE_VERSION_MINOR=6 -DPACKAGE_VERSION_PATCH=1 -DPROJECT_VERSION=\"2.6.1\" -DPROJECT_VERSION_INT=20601 -I/home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee -I/home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/x64-linux-dbg -isystem /home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee/genicam/library/CPP/include -fPIC -g -std=gnu++11 -Wall -Wno-unknown-pragmas -MD -MT rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/pointcloud.cc.o -MF rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/pointcloud.cc.o.d -o rc_genicam_api/CMakeFiles/rc_genicam_api_static.dir/pointcloud.cc.o -c /home/deepvision/source/repos/vcpkg/buildtrees/rc-genicam-api/src/39ba46eb59-7a4d39cbee/rc_genicam_api/pointcloud.cc
stack trace info when crash afer reboot
0:024> ~k
# Child-SP RetAddr Call Site
00 000000b7`05bfdc90 00007ffe`6d1a3003 ucrtbased!_threadid+0x65
01 000000b7`05bfdce0 00007ffe`6d1bab0d ucrtbased!_threadid+0x203
02 000000b7`05bfdd40 00007ffe`6d1b9a90 ucrtbased!abort+0x1d
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\SYSTEM32\VCRUNTIME140_1D.dll -
03 000000b7`05bfdd80 00007ffe`b9de223a ucrtbased!terminate+0x40
04 000000b7`05bfddc0 00007ffe`b9de2ec5 VCRUNTIME140_1D!_NLG_Return2+0x10ea
05 000000b7`05bfdfa0 00007ffe`b9de6ceb VCRUNTIME140_1D!_NLG_Return2+0x1d75
06 000000b7`05bfe070 00007ffe`c6fa8cdf VCRUNTIME140_1D!_CxxFrameHandler4+0xfb
07 000000b7`05bfe100 00007ffe`c6f35bea ntdll!_chkstk+0x12f
08 000000b7`05bfe130 00007ffe`c6fa7cce ntdll!RtlRestoreContext+0x85a
09 000000b7`05bfe880 00007ffe`c4a12bdc ntdll!KiUserExceptionDispatcher+0x2e
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\System32\KERNELBASE.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\SYSTEM32\MSVCP140D.dll -
0a 000000b7`05bff5f0 00007ffe`8edb38d9 KERNELBASE!RaiseException+0x6c
0b 000000b7`05bff6d0 00007ffe`8edc7503 MSVCP140D!__ExceptionPtrRethrow+0x1b9
0c 000000b7`05bff850 00007ffe`8edc7481 MSVCP140D!std::_Throw_future_error+0x63
*** WARNING: Unable to verify checksum for D:\Users\user\Documents\source\repos\dv_app_solution\bin\AMD64\Debug\dv_camera.dll
0d 000000b7`05bff880 00007ffe`6ad0abb0 MSVCP140D!std::_Rethrow_future_exception+0x31
*** ERROR: Symbol file could not be found. Defaulted to export symbols for D:\Users\user\Documents\source\repos\dv_app_solution\bin\AMD64\Debug\Qt5Cored.dll -
0e 000000b7`05bff8d0 00007ffe`12658dd4 dv_camera!std::_Associated_state<int>::_Get_value+0x180 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\future @ 285]
0f 000000b7`05bff990 00007ffe`126595db Qt5Cored!QTextStream::realNumberPrecision+0x881d7
10 000000b7`05bff9e0 00007ffe`12659a3a Qt5Cored!QTextStream::realNumberPrecision+0x889de
11 000000b7`05bffa20 00007ffe`1265aa8b Qt5Cored!QTextStream::realNumberPrecision+0x88e3d
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\System32\KERNEL32.DLL -
12 000000b7`05bffa50 00007ffe`c59d53e0 Qt5Cored!QTextStream::realNumberPrecision+0x89e8e
13 000000b7`05bffad0 00007ffe`c6f0485b KERNEL32!BaseThreadInitThunk+0x10
14 000000b7`05bffb00 00000000`00000000 ntdll!RtlUserThreadStart+0x2b
stack trace info before reboot
24 Id: 1c230.c48 Suspend: 1 Teb: 000000fa`f2112000 Unfrozen
# Child-SP RetAddr Call Site
00 000000fa`f41ff718 00007ffe`c4a10e9e ntdll!NtWaitForSingleObject+0x14
01 000000fa`f41ff720 00007ffe`780a69b3 KERNELBASE!WaitForSingleObjectEx+0x8e
02 000000fa`f41ff7c0 00007ffe`780a7fb7 MvProducerGEV!DSGetBufferPartInfo+0x5083
03 000000fa`f41ff7f0 00007ffe`780a1239 MvProducerGEV!DSGetBufferPartInfo+0x6687
04 000000fa`f41ff830 00007ffe`6f68f86b MvProducerGEV!EventGetData+0x9
05 000000fa`f41ff860 00007ffe`6cab8060 rc_genicam_api!rcg::Stream::grab+0xdb [D:\Users\user\Documents\source\repos\vcpkg\buildtrees\rc-genicam-api\src\0c7a0497b6-b7903aa6d0.clean\rc_genicam_api\stream.cc @ 383]
06 000000fa`f41ff930 00007ffe`6cab970f dv_camera!<lambda_0853d24dae80100a0f85dadc995640b1>::operator()+0xb0 [D:\Users\user\Documents\source\repos\dv_app_solution\dv_camera\src\camera\gige_camera.cpp @ 217]
07 (Inline Function) --------`-------- dv_camera!std::_Func_class<void>::operator()+0x12 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\functional @ 869]
08 000000fa`f41ffc90 00007ffe`6cabb84f dv_camera!std::_Packaged_state<void __cdecl(void)>::_Call_immediate+0x1f [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\future @ 593]
09 000000fa`f41ffce0 00007ffe`6cabab3b dv_camera!std::_Deferred_async_state<void>::_Run_deferred_function+0x2f [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\future @ 659]
0a (Inline Function) --------`-------- dv_camera!std::_Associated_state<int>::_Maybe_run_deferred_function+0x1d [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\future @ 381]
0b 000000fa`f41ffd10 00007ffd`fbee4956 dv_camera!std::_Associated_state<int>::_Get_value+0x7b [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\future @ 277]
0c 000000fa`f41ffd60 00007ffd`fbee5ee1 Qt5Core!QThread::run+0x56
0d 000000fa`f41ffdb0 00007ffe`c59d53e0 Qt5Core!QThread::start+0x361
0e 000000fa`f41ffde0 00007ffe`c6f0485b KERNEL32!BaseThreadInitThunk+0x10
0f 000000fa`f41ffe10 00000000`00000000 ntdll!RtlUserThreadStart+0x2b
Hi,
I used your rc_genicam_api
to build my own project and followed the below guild-line to compute the 3D coordinates of a pixel from image.
From my understanding of your sensor
and api
, I obtained the necessary information for the calculation as:
focalLength=rcg::getFloat(nodemap, "FocalLengthFactor", 0, 0, false);
baseLine=rcg::getFloat(nodemap, "Baseline", 0, 0, true);
dispScale=rcg::getFloat(nodemap, "Scan3dCoordinateScale", 0, 0, true);
and calculations were done as following:
int disp = dispImg.pixel(pixel[0],pixel[1]); //this one give disparity value as the pixel
double d = double(disp);
point3D[0] = pixel[0]*baseLine/d;
point3D[1] = pixel[1]*baseLine/d;
point3D[2] = focalLength*imgW*baseLine/d;
However, I kept receiving weird result (depth is not sufficient right and is not corresponding to the distance to a flat object in front of the object when I moved it back and forth).
What should be wrong in my implementation/understanding?
Thanks,
Phuong
Hi,
I cloned the repository and followed the manual for compilation on the README but when I started trying some gc_*
command in terminal, I got the same error about libGCBase_gcc421_v3_0.so
, for example:
$ gc_info
gc_info: error while loading shared libraries: libGCBase_gcc421_v3_0.so: cannot open shared object file: No such file or directory
Please kindly give advice to solve the problem.
Cheers,
Phuong
I installed the rc_genicam_api in my Ubuntu home directory. When I run the gc_info -l the console prints out that the transport layer is missing like in the section about the transport layer. The problem for me is now how I change the path ( which command) and to what(I don’t know where the transport layer is).
PS:i am new to Linux und your api
I would like to use the roboception image data in my own C++ program. I have downloaded the binaries (rc_genicam_api, v1.3.6 for Win64).
When I try to compile a program which is quite similar to your example gc_pointcloud.cc. I am getting a linker error:
LINK : fatal error LNK1104: Cannot open file "GCBase_MDd__v3_0.lib"
I am using visual studio 2015 (v140) compiler. I added the additional library directory (path to rc_genicam_api-win64-vc14-v1.3.6\lib) to the linker properties and added as additional dependencies GCBase_MD_VC120_v3_0.lib;GenApi_MD_VC120_v3_0.lib;rc_genicam_api.lib.
Where is my fault? Thanks in advance.
I see this ships with Baumer transport layer for gige but also usb cameras.
Is there anything missing so that it could also work with USB Vision compliant devices?
Thanks in advance.
PS: I'm also trying to understand what's missing in EMVA Reference Implementation for users that want to adress a camera without using proprietary SDKs, if anyone can point me to a wiki/manual explaining that, it would be awesome!
Hi,
i am using a rc_visard 65m and this library to stream disparity images via GenICam.
I read the Image from the .pfm-File (e.g. image_946691111.740987800_Disparity_1_0.zip) with this snippet (abducted from here: https://lmb.informatik.uni-freiburg.de/resources/datasets/IO.py):
file = open(path_to_pfm, 'rb')
#skip metadata
file.readline().rstrip()
file.readline().rstrip()
file.readline().rstrip()
#read into numpy array Big Endian float
data = np.fromfile(file, dtype='>f')
#reshape and flip
data = np.reshape(data, (480, 640))
data = np.flipud(data)
I got the cam parameters via gc_info serial_no?Scan3dControl
and they are:
self.params = {'FocalLengthFactor': 0.843637, 'Scan3dOutputMode': 'DisparityC', 'Scan3dDistanceUnit': 'Pixel', 'Scan3dCoordinateOffset': 0.0, 'Scan3dInvalidDataValue': 0.0, 'Scan3dCoordinateScale': 0.0625, 'Scan3dInvalidDataFlag': 1.0, 'Scan3dFocalLength': 539.927, 'Scan3dBaseline': 0.0649325, 'Scan3dPrincipalPointU': 320.0, 'Scan3dPrincipalPointV': 240.0, 'Baseline': 0.0649325}
But when I want to calculate the pixel [240, 320] in real world coordinates like here:
https://doc.rc-visard.com/latest/en/gigevision.html#image-stream-conversions
p_x = (x-self.params['Scan3dPrincipalPointU']) * self.params['Scan3dBaseline']/(dik*self.params['Scan3dCoordinateScale'])
p_y = (y-self.params['Scan3dPrincipalPointV']) * self.params['Scan3dBaseline']/(dik*self.params['Scan3dCoordinateScale'])
p_z = self.params['Scan3dFocalLength'] * self.params['Scan3dBaseline']/(dik*self.params['Scan3dCoordinateScale'])
The distance for an Object that is 80cm
away is p_z=7.6m
.
I think i've made a mistake reading the disparity Image from file, because my Image contains very small values. More like uint8 than uint16. And so dik
is small and p_z
is following by that too big.
I have tried to change dtype='>u2'
when reading the .pfm but then i cant shape the Image to the correct size because i get twice as much values (614400 instead of 307200)?
Anybody knows where I have made a mistake or succeeded with getting the conversion from pixel to world done?
Thanks for your help
derEskimo
Do you know if baumer gentl allows connecting and receiving frames from non-Baumer cameras? I have a problem connecting to pointgrey camera - getting nothing listed
./gc_info -l
Transport Layer ---/rc_genicam_api/baumer/Ubuntu-14.04/x86_64//libbgapi2_gige.cti_2.9.18805.18905
Vendor: Baumer
Model: bgapi2_gige
Vendor version: 2.9.18805.18905
TL type: GEV
Name: libbgapi2_gige.cti
Pathname: ---/rc_genicam_api/baumer/Ubuntu-14.04/x86_64//libbgapi2_gige.cti
Display name: Baumer GEV TL
GenTL version 1.5
Interface enp0s3
Display name: enp0s3
TL type: GEV
Interface enp0s8
Display name: enp0s8
TL type: GEV
Hi, I'm using this library on Ubuntu with a Flir A65 camera.
My program reads continuously the image stream like below code.
The Flir camera automatically perfom NUC actions for calibration every few minutes.
When the NUC action occurs the programm crashes immediately.
For e.g. the Plerora ebus player this is no problem.
How can I handle this witrh rc_genicam_api?
GDB:
Thread 10 "genicam" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd6ffd700 (LWP 21285)]
0x00007ffff68e15d9 in rcg::Buffer::getImagePresent() const () from /usr/local/lib/librc_genicam_api.so.1.3
(gdb) bt
#0 0x00007ffff68e15d9 in rcg::Buffer::getImagePresent() const () from /usr/local/lib/librc_genicam_api.so.1.3
#1 0x000000000042a5d5 in GApiNode::image_callback(rcg::Buffer const*) ()
#2 0x0000000000429b2d in GApiNode::stream_thread() ()
...
CODE:
if (stream_) {
while (!abort_) {
const rcg::Buffer *buffer = stream_->grab(1000);
image_callback(buffer);
}
}
...
In the image_callback I have something like that:
if(buffer && !buffer->getIsIncomplete() && buffer->getImagePresent())
For some reason I need to compile version 1.3.12
I follow these steps and get below error when executing make.
Whats wrong or missing?
I use Ubuntu 16.04
cd
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
make
make install
ros@xxx:~/xxx/rc_genicam_api/build$ make
Scanning dependencies of target rc_genicam_api
[ 2%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/exception.cc.o
[ 5%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/system.cc.o
[ 8%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/interface.cc.o
[ 11%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/device.cc.o
[ 14%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/stream.cc.o
[ 17%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/cport.cc.o
[ 20%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/buffer.cc.o
[ 23%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/config.cc.o
[ 26%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/image.cc.o
[ 29%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/imagelist.cc.o
[ 32%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/project_version.cc.o
[ 35%] Building CXX object rc_genicam_api/CMakeFiles/rc_genicam_api.dir/gentl_wrapper_linux.cc.o
make[2]: *** Keine Regel vorhanden, um das Ziel „../genicam/bin/Linux64_x64/libGCBase_gcc421_v3_0.so“,
benötigt von „rc_genicam_api/librc_genicam_api.so.1.3“, zu erstellen. Schluss.
CMakeFiles/Makefile2:123: die Regel für Ziel „rc_genicam_api/CMakeFiles/rc_genicam_api.dir/all“ scheiterte
make[1]: *** [rc_genicam_api/CMakeFiles/rc_genicam_api.dir/all] Fehler 2
Makefile:160: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2
I'm getting a segfault when calling Buffer::getTLType()
.
This happens in the getBufferString()
function and can be fixed by the following code:
inline std::string getBufferString(const std::shared_ptr<const GenTLWrapper> &gentl,
void *stream, void *buffer, GenTL::BUFFER_INFO_CMD cmd)
{
std::string ret;
GenTL::INFO_DATATYPE type;
char tmp[1024]="";
size_t size=sizeof(tmp);
if (stream != 0 && buffer != 0)
{
//if (gentl->DSGetBufferInfo(stream, buffer, cmd, &type, &ret, &size) == GenTL::GC_ERR_SUCCESS)
if (gentl->DSGetBufferInfo(stream, buffer, cmd, &type, &tmp, &size) == GenTL::GC_ERR_SUCCESS)
{
if (type == GenTL::INFO_DATATYPE_STRING)
{
ret=tmp;
}
}
}
return ret;
}
Hi there,
when camera has a permanent IP misconfigured (DHCP is off in the camera), and trying to connect to it to update the IP, device.open() using access mode READONLY or CONROL always fails with error -1005.
The same camera can be accessed with Pleora SDK and correct IP address forced into it.
Is this a Baumer issue or something in the wrapper code?
Could you give an example about how to set parameter of white balancing?
Hi,
I have installed the API on my Nvidia Jetson AGX Orin Developerkit (32GB)
works just fine but when executing any gc_... command I only get the output Stoull. not even an error which could be traced back.
Does anyone have experienced a similar issue or Knows where this behavior is coming from ?
I get the following error and the system wont recover unless rebooted.
OS: Ubuntu 22.04
Cameras: Basler. FLIR
On calling: rcg::getDevices()
terminate called after throwing an instance of 'rcg::GenTLException'
what(): Interface::open(): Module not initialized (-1002)
Aborted (core dumped)
from my reading ive found this document, check page 56
I have found the following sources:
http://docs.ros.org/en/noetic/api/rc_genicam_api/html/annotated.html
https://doc.rc-visard.com/latest/en/gigevision.html#sect-genicam
however none of them give me a simple example of using this library.
Where would i be able to find some ?
Hi, i have a Question about Chunkdata.
When I set the ChunkModeActive=1 and for example ChunkSelector=ComponentIDValue, then run the Aquisition and query the ChunkComponentIDValue it stays not available (NA)
When i want to use ChunkModeActive in harvesters (https://github.com/genicam/harvesters) I get the same error described here: genicam/harvesters#225 as soon as i try to access the returned buffer.
So is it possible to get Chunkdata from the rc_visard?
And what am i doing the wrong way?
Thanks for any help
I am using a Basler acA1280-60gc and using the .cti files provided by Basler to use it with GenICam C++ API.
What I am trying to do:
Run the device in 2 modes (CONTROL
and READONLY
) and get streams simultaneously from them. Or if there is a better way than this to get 2+ streams simultaneously from a single camera.
Problem:
I am able to grab frames using the device in CONTROL
mode. However, I when changing to READONLY
mode, I am able to start the device in that mode but not able to stream data into a buffer. I am trying to follow the documentation and the code as per the examples in tools
.
While running the camera in CONTROL
mode and trying to run another piece in READONLY
mode, the CONTROL
mode runs fine but for READONLY
mode, I am receiving the following error:
terminate called after throwing an instance of ‘rcg::GenTLException’
what(): Stream::startStreaming(): Unknown error (-1017)
I am attaching the results of $ ./gc_info -l
:
Transport Layer ProducerGEV.cti
Vendor: Basler
Model: GEV
Vendor version: 1.0.0.0
TL type: GEV
Name: ProducerGEV-1.4.0.cti
Pathname: /opt/pylon/lib/gentlproducer/gtl/ProducerGEV-1.4.0.cti
Display name: Basler GEV GenTL Producer
GenTL version 1.5
Interface Basler GEV GenTL Interface Module
Display name: GigE Vision
TL type: GEV
Device Basler acA1280-60gc (23741763)
Vendor: Basler
Model: acA1280-60gc
TL type: GEV
Display name: gige
User defined name: gige
Access status: Unknown
Serial number: 23741763
Version: 106487-18
TS Frequency: 0
Transport Layer ProducerU3V.cti
Vendor: Basler
Model: U3V
Vendor version: 1.0.0.0
TL type: U3V
Name: ProducerU3V.cti
Pathname: /opt/pylon/lib/gentlproducer/gtl/ProducerU3V.cti
Display name: Basler U3V GenTL Producer
GenTL version 1.5
Interface Basler U3V GenTL Interface Module
Display name: USB3 Vision
TL type: U3V
I am attaching the results of $ ./gc_config -l
:
ID: Basler GEV GenTL Interface Module:23741763
GenTL ID: Basler acA1280-60gc (23741763)
Serial number: 23741763
User defined ID: gige
Interface 0:
MAC Address: 3053391843
Current IP: c0a80165
Current subnet mask: ffffff00
Current gateway: c0a80101
Persistent IP on/off:
Persistent IP: 0
Persistent subnet mask: 0
Persistent gateway: 0
DHCP on/off:
Link local on/off:
Ptp parameters are not available
Any help in this is appreciated. All I want is to access the camera simultaneously by multiple client nodes.
There is a new GenApi reference implementation available.
Great work by the way!
Thank you for this library.
Installed v2.5.14 with the following flags
cmake -DCMAKE_INSTALL_PREFIX=/opt/rc_genicam -DINSTALL_COMPLETION=ON ..
make
sudo make install
Been trying to link it in CMakeLists after installing into /opt/rc_genicam
CMakeLists.txt
find_package(RC_GENICAM_API REQUIRED HINTS "/opt/rc_genicam")
message("found RCG includes: ${RC_GENICAM_API_INCLUDE_DIRS}")
message("found RCG libs: ${RC_GENICAM_API_LIBRARIES}")
include_directories(
include
${RC_GENICAM_API_INCLUDE_DIRS}
)
add_executable(cam src/cam2cv_producer.cpp)
target_link_libraries(cam ${RC_GENICAM_API_LIBRARIES})
on cmake.. i get
found RCG includes: /opt/rc_genicam/include;/opt/rc_genicam/include/rc_genicam_api/genicam
found RCG libs: /opt/rc_genicam/lib/libGCBase_gcc48_v3_3.so;/opt/rc_genicam/lib/libGenApi_gcc48_v3_3.so;/opt/rc_genicam/lib/liblog4cpp_gcc48_v3_3.so;/opt/rc_genicam/lib/libLog_gcc48_v3_3.so;/opt/rc_genicam/lib/libMathParser_gcc48_v3_3.so;/opt/rc_genicam/lib/libNodeMapData_gcc48_v3_3.so;/opt/rc_genicam/lib/libXmlParser_gcc48_v3_3.so;rc_genicam_api
-- Configuring done
-- Generating done
-- Build files have been written to: /home/myron/dev/cam-share/build
but make fails with
/usr/bin/ld: cannot find -lrc_genicam_api
Hi, would like to know does this open-source package support the GV-5260CP-M-GL GigE Vision camera [1] in ROS Melodic or ROS Noetic? If do, is there any documentation that listed a list of published topics? Thanks.
Hi,
I am executing your example tool gc_stream
and changed line 495 from:
stream[0]->startStreaming();
to
stream[0]->startStreaming(20);
Suddenly, I am only receiving exactly 20 frames, then the program hangs until it fails with the message Cannot grab images
. I suspect, that buffers are not correctly reused.
From the documentation of startStreaming()
:
/**
Allocates buffers and registers internal events if necessary and starts
streaming.
@param na Number of buffers to acquire. Set <= 0 for infinity.
*/
I interpreted this as that giving 20
as parameter, it should have allocated 20 buffers and then reuse them, not outputting a maximum of 20 buffers/frames.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.