- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using pyrealsense2 library for Intel realsense camera d435. I was trying to get the distance to an object using the function depth.get_distance().
However I am getting this following error: "get_distance(): incompatible function arguments. The following argument types are supported:
1. (self: pyrealsense2.pyrealsense2.depth_frame, x: int, y: int) -> float
Invoked with: <pyrealsense2.pyrealsense2.depth_frame object at 0x0000017D60EC4A08>, 640.0, 360.0"
Please help if you know why this is happening.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using the example program on the bottom of the front page of the Python wrapper, please?
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python
An alternate approach to getting the distance to an object in Pyrealsense2 is with the 'distance_to-object' tutorial that Intel has published.
https://github.com/IntelRealSense/librealsense/blob/jupyter/notebooks/distance_to_object.ipynb

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page