Open vstadnytskyi opened 2 years ago
I found what is the problem. The driver object has connected itself to a wrong camera.
if I request device info from a profile, I do not get the camera I have requested with specific serial number. See below.
In [8]: driver.profile["gyro"].get_device()
Out[8]: <pyrealsense2.device: Intel RealSense D435I (S/N: 139522074713 FW: 05.12.07.150 on USB2.1)>
@AbdelRahmanNasser20, I still get a problem with driver class. It connects to another camera first.
In [1]: from intel_realsense_devices.driver import Driver
In [2]: driver = Driver()
In [3]: driver.init(serial_number="f1231322")
----- Available devices -----
Device PID: 0B3A
Device name: Intel RealSense D435I
Serial number: 139522074713
Firmware version: 05.12.07.150
USB: 2.1
Enabled all streams
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Input In [3], in <module>
----> 1 driver.init(serial_number="f1231322")
File ~\Documents\Valentyn\custom_python_libraries\intel-realsense-devices\intel_realsense_devices\driver.py:67, in Driver.init(self, serial_number)
64 self.conf[IMAGE].enable_device(serial_number)
65 self.conf[GYRO].enable_device(serial_number)
---> 67 self.start()
File ~\Documents\Valentyn\custom_python_libraries\intel-realsense-devices\intel_realsense_devices\driver.py:88, in Driver.start(self)
86 self.profile[ACCEL] = self.pipeline[ACCEL].start(self.conf[ACCEL])
87 self.profile[GYRO] = self.pipeline[GYRO].start(self.conf[GYRO])
---> 88 self.profile[IMAGE] = self.pipeline[IMAGE].start(self.conf[IMAGE])
RuntimeError: Couldn't resolve requests
In [4]: import intel_realsense_devices
In [5]: intel_realsense_devices.__version__
Out[5]: '0.post52+gb0d4b19'
It still connects to another camera
self.device
<pyrealsense2.device: Intel RealSense D435I (S/
N: 139522074713 FW: 05.12.07.150 on USB2.1)>
Check version of the code I have
In [5]: intel_realsense_devices.__version__
Out[5]: '0.post52+gb0d4b19'
@AbdelRahmanNasser20 Following up on the most recent pull request.
We need more feedback and diagnostics options when instantiating driver object.
Here is the minimal example that should yield working driver object. Unless I am not using it correctly, then we need to have documentation on how it supposed to be used.
Rebooting computer did not solve the problem. It is possible we need to do hardware reset before continuing. If that is correct, we need to have an extra function that would allow us to do this. Proposed definition: