Coder Social home page Coder Social logo

rc_genicam_api's Introduction

Roboception GenICam Convenience Layer

This package combines the Roboception convenience layer for images with the GenICam reference implementation and a GigE Vision transport layer. It is a self contained package that permits configuration and image streaming of GenICam / GigE Vision 2.0 compatible cameras like the Roboception rc_visard. The API is based on C++ 11 and can be compiled under Linux and Windows.

This package also provides some tools that can be called from the command line for discovering cameras, changing their configuration and streaming images.

Prebuilt binaries can be downloaded on the releases page.

Contents

Minimum Requirements

  • Linux x64 / i86: gcc >= 4.8
  • ARMhf: gcc >= 4.9.4
  • Linux AArch64: gcc >= 5.4
  • Windows 10: Visual Studio >= VC140

Compiling and Installing

Linux

Building follows the standard cmake build flow. Please make sure to set the install path before compiling. Otherwise it can happen that the transport layer is not found when calling the tools.

cd <main-directory>
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=<install-directory> ..
make
make install

Bash completion

To install bash completion, configure cmake with -DINSTALL_COMPLETION=ON

Debian package

A Debian package can be built with e.g.

cd <main-directory>
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
make package

Windows

The main directory contains the script build_win.bat. Execute this script in the Visual Studio Developer Command Prompt for building the package. Alternatively, you can use cmake manually to generate a build project for compilation with your favorite compiler.

NOTE: For using the libraries in own projects, define the symbol GENICAM_NO_AUTO_IMPLIB in your project file to avoid linker problems with the GenICam libraries.

Description of Tools

The tools do not offer a graphical user interface. They are meant to be called from a shell (e.g. Power Shell under Windows) or script and controlled by command line parameters. Calling the tools without any parameters prints a help text on the standard output.

NOTE: If any tool returns the error No transport layers found in path ..., then read the section 'Transport Layer' below.

gc_info

Lists all available systems (i.e. transport layers), interfaces and devices with some information. If a device ID is given on the command line, then the complete GenICam nodemap with all parameters and their current values are listed.

gc_info -h | -l | ([-o <xml-output-file>] [<interface-id>:]<device-id>[?<node>] [<key>=<value>] ...)

Provides information about GenICam transport layers, interfaces and devices.

Options:
-h   Prints help information and exits
-l   List all all available devices on all interfaces
-o   Filename to store XML description from specified device

Parameters:
<interface-id> Optional GenICam ID of interface for connecting to the device
<device-id>    GenICam device ID, serial number or user defined name of device
<node>         Optional name of category or parameter to be reported
<key>=<value>  Optional GenICam parameters to be changed in the given order before reporting

gc_config

Can be used to list network specific information of GenICam compatible GigE Vision 2 cameras. The network settings as well as all other parameters provided via GenICam can be changed.

gc_config -h | -l | ([<interface-id>:]<device-id> <options> ...)

Configuration of a GigE Vision device via GenICam.

-h             Prints help information and exits
-l             Lists all available GigE Vision devices

Parameters:
<interface-id> Optional GenICam ID of interface for connecting to the device
<device-id>    GenICam device ID, serial number or user defined name of device

Options:
-n <id>        Set user defined id
-d 1|0         Switch DHCP on or off
-p 1|0         Switch persistent IP on or off
-t 1|0         Switch precision time protocol (ptp) on or off
-i <ip>        Set persistent IP address
-s <ip>        Set subnet mask for persistent IP address
-g <ip>        Set default gateway for persistent IP address
--iponly       Show current IP of device instead of full summary
<key>=<value>  Optional GenICam parameters to be changed in the given order

gc_stream

This tool shows how to configure and stream images from a camera. GenICam features can be configured directly from the command line. Images will be stored in PGM or PPM format, depending on the image format.

Streams of the Roboception rc_visard can be enabled or disabled directly on the command line by setting the appropriate GenICam parameters. The following command enables intensity images, disables disparity images and stores 10 images:

gc_stream <ID> ComponentSelector=Intensity ComponentEnable=1 ComponentSelector=Disparity ComponentEnable=0 n=10

NOTE: Many image viewers can display PGM and PPM format. The sv tool of cvkit can also be used.

gc_stream -h | [-f <fmt>] [-t] [<interface-id>:]<device-id> [n=<n>] [<key>=<value>] ...

Stores images from the specified device after applying the given optional GenICam parameters.

Options:
-h         Prints help information and exits
-t         Testmode, which does not store images and provides extended statistics
-f pnm|png Format for storing images. Default is pnm

Parameters:
<interface-id> Optional GenICam ID of interface for connecting to the device
<device-id>    GenICam device ID, serial number or user defined name of device
n=<n>          Optional number of images to be received (default is 1)
<key>=<value>  Optional GenICam parameters to be changed in the given order

gc_pointcloud

This tool streams the left image, disparity, confidence and error from a Roboception rc_visard sensor. It takes the first set of time synchronous images, computes a colored point cloud and stores it in PLY ASCII format. This tool demonstrates how to synchronize different images according to their timestamps.

NOTE: PLY is a standard format for scanned 3D data that can be read by many programs. The plyv tool of cvkit can also be used for visualization.

gc_pointcloud -h | [-o <output-filename>] [<interface-id>:]<device-id>

Gets the first synchronized image set of the Roboception rc_visard, consisting
of left, disparity, confidence and error image, creates a point cloud and
stores it in ply ascii format.

Options:
-h        Prints help information and exits
-o <file> Set name of output file (default is 'rc_visard_<timestamp>.ply')

Parameters:
<interface-id> Optional GenICam ID of interface for connecting to the device
<device-id>    GenICam device ID, serial number or user defined name of device

gc_file

This tool can be used to upload and download a file into the persistent user space of an industrial camera.

tools/gc_file -h | [<interface-id>:]<device-id> -f | (<device-file> [-w|-r <file>])

Downloading or uploading a file via GenICam.

-h            Prints help information and exits
-f            Lists names of files on the device
-w <file>     Writes the given local file into the selected file on the device
-r <file>     Reads the selected file on the device and stores it as local file

The selected file is printed on std out if none of -f, -w and -r are given.

Definition of Device ID

There are multiple ways of specifying an ID to identify a device.

  1. The serial number of the device serves as ID. Example: 02911931

  2. The given ID can also be a user defined name. The user defined name is set to rc_visard by default and can be changed with:

    gc_config <ID> -n <user-defined-name>
    

    This way of identifying a device can fail if there is more than one device with the same name. No device is returned in this case.

    If the user defined name contains one or more colons, it must be preceded by a colon (e.g. :my:name) or an interface ID (see below).

  3. The device ID of the GenTL producer (see Transport Layer section below) may also be used. This ID is unique, but not persistent as it depends on the implementation of the GenTL producer. Thus, it can change after software updates. It often encodes the MAC address of the sensor in some way.

    Example: 00_14_2d_2c_6e_bb

All three options can be seen in the output of gc_config -l.

Optional Interface ID prefix

If the given ID contains a colon (i.e. :), the part before the (first) colon is interpreted as interface ID and the part after the first colon is treated as device ID. This is the format that gc_config -l shows. A device with the given ID is only sought on the specified interface. This can be useful if there are several ways to reach a device from a host computer, e.g. via wireless and wired network connection, but a certain connection type (e.g. wired) is preferred due to higher bandwidth and lower latency.

Examples: eth0:00_14_2d_2c_6e_bb, eth1:02911931 or wlan0:rc_visard

A colon at the beginning of the ID effectively defines an empty interface ID which triggers looking on all interfaces.

If the given ID does not contain a colon, the ID is interpreted as the device ID itself and is sought throughout all interfaces as well.

Finding the Transport Layer

The communication to the device is done through a so called transport layer (i.e. GenTL producer version 1.5 or higher). This package provides and installs a default transport layer that implements the GigE Vision protocol for connecting to the Roboception rc_visard. According to the GenICam specification, the transport layer has the suffix '.cti'. The environment variable GENICAM_GENTL32_PATH (for 32 bit applications) or GENICAM_GENTL64_PATH (for 64 bit applications) must contain a list of paths that contain transport layers. All transport layers are provided as systems to the application.

For convenience, if the environment variable is not defined or empty, it is internally defined with the install path of the provided transport layer (as known at compile time!). If the package is not installed, the install path is changed after compilation or the package is moved to another location after installation, then the transport layer may not be found. In this case, the tools shows an error like e.g.:

'No transport layers found in path /usr/lib/rc_genicam_api'

In this case, the corresponding environment variable (see above) must be set to the directory in which the transport layer (i.e. file with suffix '.cti') resides.

Under Windows, as second fall back additionally to the install path, the directory of the executable is also added to the environment variable. Thus, the install directory can be moved, as long as the cti file stays in the same directory as the executable.

Network Optimization under Linux

When images are received at a lower rate than set/exepected the most likely problem is that this (user space) library cannot read the many UDP packets fast enough resulting in incomplete image buffers.

Test Script

The net_perf_check.sh script performs some simple checks and should be run while or after streaming images via GigE Vision.

./net_perf_check.sh --help

Jumbo Frames

First of all increasing the UDP packet size (using jubo frames) is strongly recommended! Increase the MTU of your network interface to 9000, e.g.

sudo ifconfig eth0 mtu 9000

Also make sure that all network devices/switches between your host and the sensor support this.

sysctl settings

There are several Linux sysctl options that can be modified to increase performance for the GigE Vision usecase.

These values can be changed during runtime with sysctl or written to /etc/sysctl.conf for persistence across reboots.

rmem_max

If the number of UDP receive buffer errors increases while streaming, increasing the socket receive buffer size usually fixes the problem.

Check the errors with net_perf_check.sh or

netstat -us | grep errors

Increase max receive buffer size:

sudo sysctl -w net.core.rmem_max=33554432

softirq

Changing these values is usually not necessary, but can help if the kernel is already dropping packets.

Check with net_perf_check.sh and increase the values if needed:

sudo sysctl -w net.core.netdev_max_backlog=2000
sudo sysctl -w net.core.netdev_budget=600

rc_genicam_api's People

Contributors

elenafg avatar flixr avatar gowthamhosamane avatar heikohimu avatar schallerr avatar tka-andrew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rc_genicam_api's Issues

Read .pfm to numpy and conversion from pixel to world

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)

And get this Image:
DisparityImage

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

Chunk Data from rc_visard

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)
image

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

How can i find device by ip address?

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?

Segfault in getBufferString

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;
}

Linker Error

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.

Weird result of 3D coordinates calculation

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.
screenshot from 2018-01-24 15-53-47

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

Can't find usb transport layer in docker

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

crash when reboot camera durning grab

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

Unable to grab images from GenTL 1.5 producer

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).

Screenshot from 2019-05-13 16-15-08
(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!

SIGSEGV in rcg::Buffer::getImagePresent() when during streaming a NUC action happens

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())

Linking in cmake

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

support for non-baumer cameras?

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

Unable to stream images from a Basler camera

Hello,
Using gc_info able to query the camera details.
But when gc_stream is used, images are not getting saved.

Output of gc_stream

$ ./gc_stream 22034422

Package size: 1500
Received buffers:   5
Incomplete buffers: 0
Buffers per second: 1.89

Further debugging this shows, getBufferBool() is returning false in file rc_genicam_api/buffer.cc

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)
{

  • GenTL::GC_ERROR ret_val = gentl->DSGetBufferInfo(stream, buffer, cmd, &type, &ret, &size);
  • std::cout << ret_val <<"\n";
    }

return ret != 0;

Output with snippet added for debug

$ ./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.

Output of gc_info

$ ./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

build eroor when use vcpkg install on ubuntu 16.04 and gcc 7.5,

[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

Error when running gc_* command

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

How can i open a device by ipaddress?

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 ?

Compatibility with USB Vision cameras?

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!

trying to force the IP config fails

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?

ICommand::Execute() - wrong return type

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)");
}

Does it support in nvidia TX2 ARM(V8) product

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

Keine Regel vorhanden ... Linux64_x64/libGCBase_gcc421_v3_0.so

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

CMAKE ERROR

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 as

cmake_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 .txx

CMake 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!

windows compile problems

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

gc_stream Exception: Node is not writable. : AccessException thrown in node 'AcquisitionStart' while calling 'AcquisitionStart.Execute()' (file 'CommandT.h', line 61)

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.
image

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

startStreaming() with non-negative number of buffers does not work

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.

Execution on ARM(v8) not Possible | Stoull

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 ?

Ubuntu 22.04 Incomplete buffer received

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

saving values instead of images

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 !

Issue with using READONLY mode for Basler camera

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.

Enable multiple Components but receiving only the first one?

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:
image
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:
image

I hope somebody knows what causes this behaviour.

With kind regards
derEskimo

Transport Layer

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.