harvesters icon indicating copy to clipboard operation
harvesters copied to clipboard

Harvester.create raises InvalidParameterException (flir Blackfly camera)

Open oliver-batchelor opened this issue 1 year ago • 3 comments

Describe the Issue

I'm trying harvesters with our cameras and create on any of the devices raises an InvalidParameterException on one of the register_event calls. Any tips on why this doesn't work would be appreciated!

I'm on Ubuntu 20.04, Flir spinnaker SDK spinnaker-3.0.0.118-amd64. The cameras work with the usual PySpin API and they show up as GenICam devices, output of script is shown below.

Just installed harvesters from github. Python 3.8.

from harvesters.core import Harvester
h = Harvester()
h.add_file('/opt/spinnaker/lib/flir-gentl/FLIR_GenTL.cti')
h.update()
print(h.device_info_list)
ia = h.create(h.device_info_list[0])

Output from running this:

[{'access_status': 1, 'display_name': 'FLIR', 'id_': 'USB\\VID_1E10&SRL_0132380C\\&2&9&5', 'model': 'Blackfly S BFS-U3-120S4C', 'parent': <genicam.gentl.Interface; proxy of <Swig Object of type 'std::shared_ptr< GenTLCpp::TLInterface > *' at 0x7f9ea3c95450> >, 'serial_number': '20068364', 'tl_type': 'U3V', 'user_defined_name': '', 'vendor': 'FLIR', 'version': '1801.0.116.0'}, {'access_status': 1, 'display_name': 'FLIR', 'id_': 'USB\\VID_1E10&SRL_012862BD\\&2&8&4', 'model': 'Blackfly S BFS-U3-120S4C', 'parent': <genicam.gentl.Interface; proxy of <Swig Object of type 'std::shared_ptr< GenTLCpp::TLInterface > *' at 0x7f9ea3c95510> >, 'serial_number': '19423933', 'tl_type': 'U3V', 'user_defined_name': '', 'vendor': 'FLIR', 'version': '1801.0.116.0'}]
Traceback (most recent call last):
  File "/home/oliver/Downloads/test_harvester.py", line 15, in <module>
    ia = h.create(h.device_info_list[0])
  File "/home/oliver/Downloads/harvesters/src/harvesters/core.py", line 3082, in create
    return self._create_acquirer(device_proxy=device_proxy, config=config)
  File "/home/oliver/Downloads/harvesters/src/harvesters/core.py", line 3112, in _create_acquirer
    ia = ImageAcquirer(device_proxy=device_proxy_, config=config,
  File "/home/oliver/Downloads/harvesters/src/harvesters/core.py", line 1665, in __init__
    manager(module.register_event(event_type))
  File "/home/oliver/Downloads/harvesters/src/harvesters/core.py", line 228, in m
    return getattr(self._source_object, attribute)(*args)
  File "/home/oliver/mambaforge/envs/conan_ros/lib/python3.8/site-packages/genicam/gentl.py", line 2582, in register_event
    return _gentl.System_register_event(self, event_id)
_gentl.InvalidParameterException: GenTL exception: Parameter not valid or out of range. (Message from the source: Error calling GenTL function system GCRegisterEvent.) (ID: -1009)

oliver-batchelor avatar Apr 07 '23 05:04 oliver-batchelor