Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to access node_map AcquisitionMode #468

Open
3 of 7 tasks
rypgis opened this issue Jul 5, 2024 · 0 comments
Open
3 of 7 tasks

Unable to access node_map AcquisitionMode #468

rypgis opened this issue Jul 5, 2024 · 0 comments

Comments

@rypgis
Copy link

rypgis commented Jul 5, 2024

Describe the Issue
Hi all, I am new to machine vision integration and have only been using Harvester a short time. I have successfully used Harvester to connect to and get images from a Basler USB camera. Now, I am integrating with a Specim FX17e GigE Vision camera and am having an issue during the image acquisition start command (ia.start()). During this command, the harvester core is unable to access a node value for the AcquisitionMode. When I inspect the node_map using dir(ia.device.node_map), the AcqusititionMode node does not exist. I am able to connect to the device and read the device_info_list.

I am currently using the Stemmer Imaging Common Vision Blox GigE Vision GenTL Producer for the Specim camera. Is it possible this GenTL producer is "blocking" the full node map? When I look at the camera node map within the Common Vision Blox GenICam Browser, the Acquisition Mode is present and the value is "Continuous".

To Reproduce
Steps to reproduce the behavior:

  1. Run specimHarvester.py (see code below)

Sample Code
I can show a piece of code that demonstrates the reported phenomenon:

  • Yes
  • No
  • (Please select either yes or no.)

If yes, please provide a sample code:

from harvesters.core import Harvester
import matplotlib.pyplot as plt
import numpy as np

h = Harvester()
h.add_file(r'C:\Program Files\STEMMER IMAGING\Common Vision Blox\GenICam\bin\win64_x64\TLIs\GEVTL.cti')
h.update()

h.device_info_list[0]
ia = h.create(0)

ia.start()

with ia.fetch(timeout=10) as buffer:
    # Let's create an alias of the 2D image component:

    component = buffer.payload.components[0]
    print(buffer)

    _1d = component.data
    np.savetxt('test.txt', _1d)
    print('1D: {0}'.format(_1d))

    # _2d = component.data.reshape(component.height, component.width)
    # print('2D: {0}'.format(_2d))
    # print(_2d.shape)
    # plt.figure()
    # plt.imshow(_2d)
    # plt.show()

    # print(
    #     'AVE: {0}, MIN: {1}, MAX: {2}'.format(
    #         np.average(_2d), _2d.min(), _2d.max()
    #     )
    # )

ia.stop()
ia.destroy()
h.reset()

If applicable, please paste the actual output (its whole traceback, etc) here:

>>> specimHarvester.py
Traceback (most recent call last):

  File ~\.conda\envs\genicam\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File ...\harvester project\specimharvester.py:19
    ia.start()

  File ~\.conda\envs\genicam\lib\site-packages\harvesters\core.py:2201 in start
    acq_mode = self.remote_device.node_map.AcquisitionMode.value

  File ~\.conda\envs\genicam\lib\site-packages\genicam\genapi.py:1920 in __getattr__
    return self.get_node(attribute)

  File ~\.conda\envs\genicam\lib\site-packages\genicam\genapi.py:1851 in get_node
    return _genapi.NodeMap_get_node(self, key)

AccessException: Feature not present (reference not valid) : AccessException thrown (file 'NodeMapRef.h', line 473)

Screenshot from GenICam Browser
Screenshot 2024-07-05 132052

Expected Behavior
I expect Harvester to connect to the camera and start the image acquisition function.

Configuration

  • OS: Windows 11 Enterprise 23H2 (22631)
  • Python: 3.8.19
  • Harvester: 1.4.3
  • GenTL Producer: Stemmer Imaging Common Vision Blox GEVTL.cti
  • Camera: Specim FX17e with CUBE processing unit

Reproducibility

This phenomenon can be stably reproduced:

  • Yes
  • No.
  • (Please select either yes or no.)

This result happens every time I try to connect to the Specim FX17 camera. No issues connecting to the Basler USB camera using the Pylon U3V GenTL Producer.

Actions You Have Taken

Additional context
remote_device.node_map (58 elements):

__class__
__del__
__delattr__
__dict__
__dir__
__doc__
__enter__
__eq__
__exit__
__format__
__ge__
__getattr__
__getattribute__
__gt__
__hash__
__init__
__init_subclass__
__le__
__lt__
__module__
__ne__
__new__
__reduce__
__reduce_ex__
__repr__
__setattr__
__sizeof__
__str__
__subclasshook__
__swig_destroy__
__weakref__
_connect
_cpp__concatenated_write
_cpp__parse_swiss_knives
_create_new_write_concatenator
_destroy
_get_device_info
_get_device_name
_get_node
_get_nodes
_invalidate_nodes
_set_nodes
clear_xml_cache
concatenated_write
connect
device_info
disconnect
get_node
has_node
load_xml_from_file
load_xml_from_string
load_xml_from_zip_file
nodes
parse_swiss_knives
pointer
poll

device.node_map (90 elements):

DeviceControl
DeviceDisplayName
DeviceID
DeviceIP
DeviceInfo
DeviceMAC
DeviceModelName
DeviceParameter
DeviceSerialNumber
DeviceType
DeviceUsername
DeviceVendorName
DeviceVersion
FireTestPacket
GVCPAckTimeout
GVCPRetryCount
GevDataStreamingMode
GevGVSPCapable
GevRDMACapable
HeartbeatTimeout
HeartbeatTimeoutMargin
PacketSize
PacketSizeLocked
PacketSizeMode
Root
StreamCount
StreamDisplayName
StreamID
StreamParameter
StreamSelector
TransportParameter
__class__
__del__
__delattr__
__dict__
__dir__
__doc__
__enter__
__eq__
__exit__
__format__
__ge__
__getattr__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant