'Problem Intel realsense camara with self.pipeline.start(config)

I have an Intel Realsense camera and I am trying to measure the distance and using a Mask_RCNN as in: https://pysource.com/2021/06/24/identify-and-measure-precisely-objects-distance-with-deep-learning-and-intel-realsense/

When I run the code, I have a problem with self.pipeline.start(config) . I do not know if this error is because of the pip, I have the version 8.1.1, however I can not install the last version with 'pip install --upgrade pip' command. Should I have python3? I am using python 2

in https://github.com/pysource7/object-distance-measurement-intelrealsense-maskrcnn/blob/master/measure_object_distance.py

Traceback (most recent call last):
  File "measure_object_distance.py", line 8, in <module>
    rs = RealsenseCamera()
  File "/home/frauas/ws_moveit/src/Measure_object_distance/realsense_camera.py", line 17, in __init__
    self.pipeline.start(config)
RuntimeError: Couldn't resolve requests

https://github.com/soarwing52/RealsensePython/blob/master/separate%20functions/measure_new.py

  File "measure_new.py", line 110, in <module>
    ARC().video()
  File "measure_new.py", line 16, in __init__
    profile = self.pipeline.start(config)
RuntimeError: Failed to resolve request. Request to enable_device_from_file("0626_005.bag") was invalid, Reason: Failed to create ros reader: Error opening file: 0626_005.bag

I would be very grateful if someone could help me.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source