Closed smitesh-sutaria closed 3 years ago
The output of gc_stream shows that it successfully received buffers. gc_stream should either store images and show this on standard output, or produce an error message, e.g. if the image format is unknown. The only reason for not seeing either of it is that there is no image data contained in the buffer. I think that you should check if your camera is properly configured.
@heikohimu Thank you for the inputs.
When we change the settings for "ChunkModeActive" to 'False', get the below error :
$ ./gc_stream 22034422 ChunkModeActive=0
Package size: 1500
Exception: Invalid layout of buffer attached to chunk parser! : RuntimeException thrown (file 'ChunkAdapterGEV.cpp', line 97)
Does gc_stream work only when ChunkModeActive is 'True' ? If so, what should be the config value for "ChunkSelector"
Is there a reason for disabling chunks if they are available?
gc_stream checks if chunks a available and enables them if possible. This happens in this line https://github.com/roboception/rc_genicam_api/blob/master/tools/gc_stream.cc#L401 The user parameters are applied afterwards, so gc_stream expects chunks, but buffers do not contain any. I should change the code to check if the user explicitly disables chunks.
For the moment, you could just initialize chunkadapter with 0 in the code.
That worked. Thank you for the inputs.
Here is the diff for the reference :
diff --git a/tools/gc_stream.cc b/tools/gc_stream.cc
index e26191f..7a67560 100644
--- a/tools/gc_stream.cc
+++ b/tools/gc_stream.cc
@@ -398,8 +398,9 @@ int main(int argc, char *argv[])
// get chunk adapter (this switches chunk mode on if possible and
// returns a null pointer if this is not possible)
- std::shared_ptr<GenApi::CChunkAdapter> chunkadapter=rcg::getChunkAdapter(nodemap, dev->getTLType());
+ //std::shared_ptr<GenApi::CChunkAdapter> chunkadapter=rcg::getChunkAdapter(nodemap, dev->getTLType());
+ std::shared_ptr<GenApi::CChunkAdapter> chunkadapter=0;
// set values as given on the command line
int n=1;
The problem with Basler cameras is fixed in rc_genicam_api release 2.5.0.
Access status: Unknown Even if I use basler's TL
We are working all the time with Basler cameras, with the producer from Basler and others. Can you be a bit more specific what the problem is? What camera model are you using? Which operating system? Which tool (with what parameters) or code are you using? What is the error message?
We are working all the time with Basler cameras, with the producer from Basler and others. Can you be a bit more specific what the problem is? What camera model are you using? Which operating system? Which tool (with what parameters) or code are you using? What is the error message?
Thanks for the quick response, I'm using:
OS : raspbian aarch64 which is based on debian 12 bookworm
rc_genicam_api branch : 4af5d76364
当我使用 ./gc_info -l
时
dv@rsap5:/opt/dv_app/lib $ ./gc_info -l
Transport Layer ProducerGEV.cti
Vendor: Basler
Model: GEV
Vendor version: 1.0.0.0
TL type: GEV
Name: ProducerGEV.cti
Pathname: /opt/pylon/lib/gentlproducer/gtl/ProducerGEV.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 acA640-120gm (23837243)
Vendor: Basler
Model: acA640-120gm
TL type: GEV
Display name: cam1
User defined name: cam1
Access status: Unknown
Serial number: 23837243
Version: 106609-24
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
The code for enumerating devices in the program refers to gc_info -l
, so I also get the same Access status
, which is Unknown
. In addition, I also use device->getAccessStatus()
to get the status, sometimes He can get OpenReadWrite
, but in most cases he gets Unknown
but if i ignore access status, it can still open, grab ,close,
I can confirm that I also get the access status unknown when I use the pylon producer with some Basler cameras. However, the producer that comes with the rc_genicam_api correctly reports ReadWrite access status for the same cameras.
The rc_genicam_api just calls a function of the producer and translates the return value to a string. I guess you need to ask Basler why their producer reports an unknown access status for their 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
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) {
std::cout << ret_val <<"\n"; }
return ret != 0;
Output with snippet added for debug
**Please note that, -1014 is GC_ERR_NOT_AVAILABLE.
Output of gc_info