GithubHelp home page GithubHelp logo

intel-realsense-devices's People

Contributors

abdelrahmannasser20 avatar vstadnytskyi avatar vstadnytskyi-fda avatar

Watchers

 avatar

intel-realsense-devices's Issues

Device class initialization fails

the script below freezes and nothing happens. I could not Ctrl-C the shell so I had to completely close it.

In [1]: import intel_realsense_devices
   ...:
   ...: print(f"current version of the library is {intel_realsense_devices.__version__}")
   ...: from intel_realsense_devices.device import Device
   ...:
   ...: conf_filename = r"C:\Users\AR-VR lab W1\Documents\Valentyn\custom_python_libraries\instrumentation\intel-realse
   ...: nse-depth-camera\L515_config.yaml"
   ...: device = Device(config_filename=conf_filename, h5py_filename="YOUR H5PY/HDPY FILE NAME")
   ...: device.init()
current version of the library is 0.post90.dev0+gb8ea2c5

with config file

name: 'augemented reality setup'
model: 'Intel RealSense L515'
serial_number: "f1231322"
serial_number2: "139522074713"
imgs_to_collect: 100

@AbdelRahmanNasser20, We need to introduce logging to the codes to try to understand what is going on. I am going to add few examples of logging and how to use it. I would like if you can take a lead and work on the rest of the codes and introduce logging capabilities where it is necessary.

Here is a good reference for logging: https://realpython.com/python-logging/

see driver class as an example. if you test the driver class by itself you would see that there is a new file created in the temporary directory that is constantly updated with information from this process. Use notepad++ and enable dynamic update (https://superuser.com/questions/274961/how-to-automatically-reload-modified-files-in-notepad) to see most recent changes in the log file

To find temp directory:
From the Start menu, open the Run dialog box or you can Press the "Window + R" key to open the RUN window. Type "%temp%" and click on the OK button. Note: And, you can also find the temporary files in the "Temp" folder by typing the "temp" command or by typing the "C:\Windows\Temp" path in the Run window.

Create device.py file

Create a device level code that upon lunching would:

  • find a depth camera specified by model or(and) serial number. preferably serial number since it is unique
  • configures depth camera (depth, color, IMUs, etc.)
  • lunches data collection and storage in a circular buffer (see circular-buffer-numpy)
  • provides set of simples wrappers to access data

driver class

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

>ipython3
Python 3.8.8rc1 (tags/v3.8.8rc1:dfd7d68, Feb 17 2021, 11:01:21) [MSC v.1928 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.0.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from intel_realsense_devices.driver import Driver

In [2]: driver = Driver()

In [3]: driver.init(serial_number="f1231322")

In [4]: driver.get_images()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Input In [4], in <module>
----> 1 driver.get_images()

File ~\Documents\Valentyn\custom_python_libraries\intel-realsense-devices\intel_realsense_devices\driver.py:194, in Driver.get_images(self)
    191 depth = f.get_depth_frame()
    193 color_img = np.asanyarray(color.get_data())
--> 194 ir_img = np.asanyarray(infrared.get_data())
    195 depth_img = np.asanyarray(depth.get_data())
    197 return {"color": color_img, "depth" : depth_img, "infrared" : ir_img}

RuntimeError: null pointer passed for argument "frame_ref"

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:

def hardware_reset(self):
   """
   resets hardware
   """
   dev = driver.profile["gyro"].get_device()
   dev.hardware_reset()

configuring IMUs

  • fix configuring IMUs does not work well with L515 Intel Lidar camera

see function configure in driver.py link hopefully works even if code was modified

The lines below used to work for L515 depth camera. It is not clear what has happened.

    #self.config.enable_stream(rs.stream.accel)#,rs.format.motion_xyz32f,200)
    #self.config.enable_stream(rs.stream.gyro)#,rs.format.motion_xyz32f,200)

running gnu window program

I am getting the following error code

PS C:\Users\Abdel Nasser\Documents\L151 Camera\intel-realsense-devices> "C:\Program Files (x86)\GnuWin32\bin\make.exe" -C docs html
At line:1 char:48

  • "C:\Program Files (x86)\GnuWin32\bin\make.exe" -C docs html
  •                                            ~~
    

Unexpected token '-C' in expression or statement.
At line:1 char:51

  • "C:\Program Files (x86)\GnuWin32\bin\make.exe" -C docs html
  •                                               ~~~~
    

Unexpected token 'docs' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken

Issues with D455 camera

@AbdelRahmanNasser20
I am getting an error below. I do not understand what does this error mean. Could you look into it and see what might be a problem?

In [1]: run "D:\GitHub\instrumentation\devices\AR_D455_depthcamera_CAServer.py"
current version of the library is 0.post153.dev0+gc4eb23d
WARNING:root:Device not found
WARNING:root:camera with given serial number is not found
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
File D:\GitHub\instrumentation\devices\AR_D455_depthcamera_CAServer.py:83, in <module>
     81 filename = r"D:\GitHub\instrumentation\devices\config_D455_215122256135.yaml"
     82 device = Device(config_filename = filename)
---> 83 device.init()
     84 device.start()
     86 from pcaspy import SimpleServer as CAServer, Driver as Server

File D:\GitHub\intel-realsense-devices\intel_realsense_devices\device.py:86, in Device.init(self)
     84 # intialialize the circular buffer
     85 from circular_buffer_numpy.circular_buffer import CircularBuffer
---> 86 self.buffers[DEPTH] = CircularBuffer(shape = (channels[DEPTHCHANNEL][BUFFERLENGTH],)+ self.driver.get_image_shape(DEPTH), dtype = self.driver.get_image_dtype(DEPTH))
     87 self.buffers[COLOR] = CircularBuffer(shape = (channels[COLORCHANNEL][BUFFERLENGTH],)+ self.driver.get_image_shape(COLOR), dtype = self.driver.get_image_dtype(COLOR))
     88 self.buffers[INFRARED] = CircularBuffer(shape = (channels[INFARAREDCHANNEL][BUFFERLENGTH],)+ self.driver.get_image_shape(INFRARED), dtype = self.driver.get_image_dtype(INFRARED))

File D:\GitHub\intel-realsense-devices\intel_realsense_devices\driver.py:302, in Driver.get_image_shape(self, frame_type)
    296 def get_image_shape(self, frame_type):
    297     """
    298     returns the image Shape
    299     Parameter: Nothing
    300     Returns: image Shape size
    301     """
--> 302     return self.get_images()[frame_type].shape

File D:\GitHub\intel-realsense-devices\intel_realsense_devices\driver.py:273, in Driver.get_images(self)
    267 """
    268 Setting up a dict containing images that are recived from the pipline
    269 Parameters: Nothing
    270 Returns: Dict containing images
    271 """
    272 from logging import error,warn,info,debug
--> 273 f = self.pipeline[IMAGE].wait_for_frames()
    275 #collect the frame for each frame type
    276 frameN = f.get_frame_number()

KeyError: 'images'

In [2]:

The camera is connected to the desktop but the device class says that camera is not found
image

And my config file has correct serial number

name: 'augemented reality setup'
model: 'Intel RealSense D455'
serial_number: "210523062356"

skipping/storing late frames

I am having trouble collecting the first frame. Instead it starts collecting at the second frame.

Frames array [ 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31]

Every now and then it starts collecting frames around 3-6 and sometimes it skips frames or stores the same frames.

ModuleNotFoundError: No module named 'intel_realsense_devices' when running through different shells.

In the device.py class I need to import driver class.

def init(self):
    """
    import intel real sense driver and initializes the device.
    Circular buffers that contain data for each frame type

    """
    
    from intel_realsense_devices.driver import Driver
    #from driver import Driver

'
There are two ways I can do it I can either: from intel_realsense_devices.driver import Driver
This way works when I run it through ipython

The other way is: from driver import Driver
This way works when I run it through powershell.

If were to swap the two and run them each again I get the following error:
ModuleNotFoundError: No module named 'intel_realsense_devices'

Clean-up

@AbdelRahmanNasser20

There are files in intel-realsense-devices subdirectory with extension .ipynb. It is not a core file and does not need to be in the main directory. This is more like an application since it aims at a specific task. Please clean the repository accordingly.

In the code I noticed you use direct location of the temporary directory. You can use tempfile library and import location of temp directory that way which makes it.

Please report here on what clean-up has been done. During commits you can mention this issue.

Config files - add frames per second per channel

Depending on Intel realsense depth camera we can pick difference FPS for different channels. I propose we redesign configuration file and make it nested. In addition, to standard fields, I propose to have: FPS, buffer length,

Here is an example of a section of config file:

channels:

  - #<-this is first entry in the channels list
    type: depth
    fps: 30
    buffer_length: 30

  - #<-this is second entry in the channels list
    type: color
    fps: 30
    buffer_length: 30

  - 
    type: infrared
    fps: 30
    buffer_length: 30

  - 
    type: accel
    fps: 250
    buffer_length: 30000

  - 
    type: gyro
    fps: 400
    buffer_length: 30000

Let us discuss.

I propose we split each stream(channel) in a different entry in the configuration file and assign different circular buffers and different FPS to each channel. It will provide more flexibility in future development. Though, it would add a little bit more coding.

in addition, it will allows to configure L515 camera differently from D435i camera based on config file. For example, there is no "infrared" channel in D435i or D455 cameras but it is present in L515. Adding channels to configuration file would provide needed flexibility.

What do you think? @AbdelRahmanNasser20

Issues reshaping data to insert into the buffer

Having issues with inserting img (color,depth,inf) data into the circular buffer.
ERROR:
depth_array = np.asanyarray((img_dict[DEPTH])).reshape(1,1)
ValueError: cannot reshape array of size 307200 into shape (1,1)
not sure how to reshape it correctly.

USB-3 cable connection issue

It seems that L515 wants to be connected directly into USB3 port on a computer. Using an intermediate hub, even if it is a usb3 hub, seems to break the connection with L515.

Works:

  • connected directly into SS USB3 port on a computer
  • connected to D6000 Dell docking station.

Does not work:

  • amazon usb 3 hub

RuntimeError: Couldn't resolve requests in pipeline.start()

@AbdelRahmanNasser20

I cannot run device class, see short code below. I get error

RuntimeError: Couldn't resolve requests in self.pipeline[ACCEL].start(self.conf[ACCEL])

Full code and error below.

Python 3.8.8rc1 (tags/v3.8.8rc1:dfd7d68, Feb 17 2021, 11:01:21) [MSC v.1928 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.4.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import intel_realsense_devices
   ...: print(f'current version of the library is {intel_realsense_devices.__version__}')
   ...: from intel_realsense_devices.device import Device
current version of the library is 0.post153+gc4eb23d

In [2]: filename = r"D:\GitHub\intel-realsense-devices\intel_realsense_devices\test_files\config_L515_f1231322.yaml"

In [3]: device = Device(config_filename=filename)

In [4]: device.init()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Input In [4], in <cell line: 1>()
----> 1 device.init()

File D:\GitHub\intel-realsense-devices\intel_realsense_devices\device.py:68, in Device.init(self)
     66 from intel_realsense_devices.driver import Driver
     67 self.driver = Driver()
---> 68 self.driver.init(self.config_dict)
     70 default_buffer_length = 10
     71 # if channels are empty

File D:\GitHub\intel-realsense-devices\intel_realsense_devices\driver.py:78, in Driver.init(self, config_dict)
     76 self.print_device_info()
     77 self.configure() # calls method to configure the device
---> 78 self.start()

File D:\GitHub\intel-realsense-devices\intel_realsense_devices\driver.py:127, in Driver.start(self)
    123 def start(self):
    124     """
    125     starts the pipelines
    126     """
--> 127     self.profile[ACCEL] = self.pipeline[ACCEL].start(self.conf[ACCEL])
    128     self.profile[GYRO] = self.pipeline[GYRO].start(self.conf[GYRO])
    129     self.profile[IMAGE] = self.pipeline[IMAGE].start(self.conf[IMAGE])

RuntimeError: Couldn't resolve requests

In [5]:

Problem connecting to the right camera when there are multiple devices connected

Solution:
Ensure that you enable device first before setting up any pipelines.

In my case:
if serial == serial_number: # once you find the device to connect to
print('device connected')
self.conf[ACCEL] = rs.config()
self.conf[GYRO] = rs.config()
self.conf[IMAGE] = rs.config()

            self.conf[IMAGE].enable_device(serial_number)
            self.conf[GYRO].enable_device(serial_number)

Explore settings with different pipelines

I am wondering if intel real sense devices can be configured with different pipelines for different frames. It should be possible considering that Accelerometer and Gyroscope can operate at different frequencies: 200Hz and 250Hz

Issue with get_images: RuntimeError: null pointer passed for argument "frame_ref"

def get_images(self):
    """
    Setting up a dict containing images that are recived from the pipline
    Parameters: Nothing
    Returns: Dict containing images  
    """


    f = self.pipeline.wait_for_frames()
    # accel = (f[3].as_motion_frame().get_motion_data())
    # gyro =  (f[4].as_motion_frame().get_motion_data())

    color = f.get_color_frame()
    infrared = f.get_infrared_frame(0)
    depth = f.get_depth_frame()

    color_img = np.asanyarray(color.get_data())
    ir_img = np.asanyarray(infrared.get_data())
    depth_img = np.asanyarray(depth.get_data())

    return {"color": color_img, "depth" : depth_img, "infared" : ir_img}

I get the following issue:
File "c:/Users/Abdel Nasser/Desktop/L151 Camera/intel-realsense-devices/intel_realsense_devices/driver.py", line 183, in
plt.imshow(driver.get_images()['depth'])
File "c:/Users/Abdel Nasser/Desktop/L151 Camera/intel-realsense-devices/intel_realsense_devices/driver.py", line 169, in get_images
ir_img = np.asanyarray(infrared.get_data())
RuntimeError: null pointer passed for argument "frame_ref"

When I remove the infrared related lines it works. Is there a easier way to raise an issues without having to copy over the code.

ERROR: Could not build wheels for intel-realsense-devices, which is required to install pyproject.toml-based projects

Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///D:/GitHub/intel-realsense-devices
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Collecting h5py
  Downloading h5py-3.7.0-cp38-cp38-win_amd64.whl (2.6 MB)
     ---------------------------------------- 2.6/2.6 MB 56.1 MB/s eta 0:00:00
Collecting pyrealsense2
  Downloading pyrealsense2-2.50.0.3812-cp38-cp38-win_amd64.whl (24.2 MB)
     ---------------------------------------- 24.2/24.2 MB 73.0 MB/s eta 0:00:00
Collecting matplotlib
  Downloading matplotlib-3.5.3-cp38-cp38-win_amd64.whl (7.2 MB)
     ---------------------------------------- 7.2/7.2 MB 92.2 MB/s eta 0:00:00
Collecting numpy
  Downloading numpy-1.23.1-cp38-cp38-win_amd64.whl (14.7 MB)
     ---------------------------------------- 14.7/14.7 MB 81.8 MB/s eta 0:00:00
Collecting cycler>=0.10
  Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting pyparsing>=2.2.1
  Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
     ---------------------------------------- 98.3/98.3 kB ? eta 0:00:00
Collecting python-dateutil>=2.7
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ---------------------------------------- 247.7/247.7 kB ? eta 0:00:00
Collecting fonttools>=4.22.0
  Downloading fonttools-4.34.4-py3-none-any.whl (944 kB)
     ---------------------------------------- 944.1/944.1 kB 62.3 MB/s eta 0:00:00
Collecting packaging>=20.0
  Downloading packaging-21.3-py3-none-any.whl (40 kB)
     ---------------------------------------- 40.8/40.8 kB ? eta 0:00:00
Collecting kiwisolver>=1.0.1
  Downloading kiwisolver-1.4.4-cp38-cp38-win_amd64.whl (55 kB)
     ---------------------------------------- 55.4/55.4 kB ? eta 0:00:00
Collecting pillow>=6.2.0
  Downloading Pillow-9.2.0-cp38-cp38-win_amd64.whl (3.3 MB)
     ---------------------------------------- 3.3/3.3 MB 69.5 MB/s eta 0:00:00
Requirement already satisfied: six>=1.5 in c:\program files\python38\lib\site-packages (from python-dateutil>=2.7->matplotlib->intel-realsense-devices==0.post135+g0ec21b5) (1.16.0)
Building wheels for collected packages: intel-realsense-devices
  Building editable for intel-realsense-devices (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building editable for intel-realsense-devices (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [62 lines of output]
      running editable_wheel
      creating C:\Users\borg\AppData\Local\Temp\pip-wheel-da3jzcei\tmpiasttg7b\intel_realsense_devices.egg-info
      writing C:\Users\borg\AppData\Local\Temp\pip-wheel-da3jzcei\tmpiasttg7b\intel_realsense_devices.egg-info\PKG-INFO
      writing dependency_links to C:\Users\borg\AppData\Local\Temp\pip-wheel-da3jzcei\tmpiasttg7b\intel_realsense_devices.egg-info\dependency_links.txt
      writing requirements to C:\Users\borg\AppData\Local\Temp\pip-wheel-da3jzcei\tmpiasttg7b\intel_realsense_devices.egg-info\requires.txt
      writing top-level names to C:\Users\borg\AppData\Local\Temp\pip-wheel-da3jzcei\tmpiasttg7b\intel_realsense_devices.egg-info\top_level.txt
      writing manifest file 'C:\Users\borg\AppData\Local\Temp\pip-wheel-da3jzcei\tmpiasttg7b\intel_realsense_devices.egg-info\SOURCES.txt'
      reading manifest file 'C:\Users\borg\AppData\Local\Temp\pip-wheel-da3jzcei\tmpiasttg7b\intel_realsense_devices.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '__pycache__' found under directory '*'
      warning: no previously-included files matching '*.py[co]' found under directory '*'
      adding license file 'LICENSE'
      adding license file 'AUTHORS.rst'
      writing manifest file 'C:\Users\borg\AppData\Local\Temp\pip-wheel-da3jzcei\tmpiasttg7b\intel_realsense_devices.egg-info\SOURCES.txt'
      creating 'C:\Users\borg\AppData\Local\Temp\pip-wheel-da3jzcei\tmpiasttg7b\intel_realsense_devices-0.post135+g0ec21b5.dist-info'
      adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
      adding license file "AUTHORS.rst" (matched pattern "AUTHORS*")
      creating C:\Users\borg\AppData\Local\Temp\pip-wheel-da3jzcei\tmpiasttg7b\intel_realsense_devices-0.post135+g0ec21b5.dist-info\WHEEL
      running build
      running build_py
      C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\wheel\bdist_wheel.py:80: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
        if get_flag('Py_DEBUG',
      C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      Traceback (most recent call last):
        File "C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 138, in run
          self._create_wheel_file(bdist_wheel)
        File "C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 284, in _create_wheel_file
          files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
        File "C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 257, in _run_build_commands
          self.run_command("build")
        File "C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
          super().run_command(command)
        File "C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
          cmd_obj.run()
        File "C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\command\build.py", line 33, in run
          super().run()
        File "C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
          self.run_command(cmd_name)
        File "C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
          super().run_command(command)
        File "C:\Users\borg\AppData\Local\Temp\pip-build-env-jla4yavy\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
          cmd_obj.run()
        File "D:\GitHub\intel-realsense-devices\versioneer.py", line 1559, in run
          write_to_version_file(target_versionfile, versions)
        File "D:\GitHub\intel-realsense-devices\versioneer.py", line 1220, in write_to_version_file
          os.unlink(filename)
      FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\borg\\AppData\\Local\\Temp\\tmpq0qucfz1.build-lib\\intel_realsense_devices/_version.py'
      UPDATING C:\Users\borg\AppData\Local\Temp\tmpq0qucfz1.build-lib\intel_realsense_devices/_version.py
      error: Support for editable installs via PEP 660 was recently introduced
      in `setuptools`. If you are seeing this error, please report to:

      https://github.com/pypa/setuptools/issues

      Meanwhile you can try the legacy behavior by setting an
      environment variable and trying to install again:

      SETUPTOOLS_ENABLE_FEATURES="legacy-editable"
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building editable for intel-realsense-devices
Failed to build intel-realsense-devices
ERROR: Could not build wheels for intel-realsense-devices, which is required to install pyproject.toml-based projects


D435i and L515 timestamps

Figure out how to get proper timestamps for different cameras and different frames.

  • D435i
    • color image
    • depth image
    • acceleration
    • gyroscope
  • L515
    • color image
    • depth image
    • infrared image
    • acceleration
    • gyroscope

issues with recorder.py

@AbdelRahmanNasser20

I am trying to run recorder.py

C:\Users\AR-VR lab W1\Documents\Valentyn\custom_python_libraries\intel-realsense-devices\intel_realsense_devices>python recorder.py "C:\Users\AR-VR lab W1\Documents\Valentyn\custom_python_libraries\instrumentation\devices\config_L515_F1231322.yaml" "C:\Users\AR-VR lab W1\AppData\Local\Temp\1.hdf5"

and getting the following error


WARNING:root:Device not found
WARNING:root:camera with given serial number is not found
Traceback (most recent call last):
  File "recorder.py", line 275, in <module>
    recorder = Recorder(config_filename, h5py_filename)
  File "recorder.py", line 37, in __init__
    self.device.init()
  File "c:\users\ar-vr lab w1\documents\valentyn\custom_python_libraries\intel-realsense-devices\intel_realsense_devices\device.py", line 86, in init
    self.buffers[DEPTH] = CircularBuffer(shape = (channels[DEPTHCHANNEL][BUFFERLENGTH],)+ self.driver.get_image_shape(DEPTH), dtype = self.driver.get_image_dtype(DEPTH))
  File "c:\users\ar-vr lab w1\documents\valentyn\custom_python_libraries\intel-realsense-devices\intel_realsense_devices\driver.py", line 302, in get_image_shape
    return self.get_images()[frame_type].shape
  File "c:\users\ar-vr lab w1\documents\valentyn\custom_python_libraries\intel-realsense-devices\intel_realsense_devices\driver.py", line 273, in get_images
    f = self.pipeline[IMAGE].wait_for_frames()
KeyError: 'images'

I know that the camera is connected to the computer because, see below.


C:\Users\AR-VR lab W1\Documents\Valentyn\custom_python_libraries\intel-realsense-devices\intel_realsense_devices>ipython
Python 3.8.8rc1 (tags/v3.8.8rc1:dfd7d68, Feb 17 2021, 11:01:21) [MSC v.1928 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.0.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import intel_realsense_devices
   ...:
   ...: print(f"current version of the library is {intel_realsense_devices.__version__}")
   ...: from intel_realsense_devices.driver import Driver
   ...:
   ...: driver = Driver()
current version of the library is 0.post145.dev0+g9137b0f

In [2]: driver.find_devices()
Out[2]: [('f1231322', 'L500')]

In [3]:

My config file is


name: 'augemented reality setup'
model: 'Intel RealSense L515'
serial_number: "f1231322"

channels:

  - #<-this is first entry in the channels list
    type: depth
    fps: 30
    buffer_length: 30
    buffer_shape: (480, 640)
    buffer_dtype: unit16

  - #<-this is second entry in the channels list
    type: color
    fps: 30
    buffer_length: 30
    buffer_shape: (540, 960,3)
    buffer_dtype: unit8

  - 
    type: infrared
    fps: 30
    buffer_length: 30
    buffer_shape: (480, 640)
    buffer_dtype: unit8

  - 
    type: accel
    fps: 200
    buffer_length: 30000

  - 
    type: gyro
    fps: 400
    buffer_length: 30000

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.