When I tried to run SR300, which is a slightly older version of Realsense, on a MacBook, I stumbled a little, so it's a memo.
The summary is as follows.
The latest version of the SDK may fail to connect to a Realsense device with the following error:
Could not open device command transfer failed to execute bulk transfer, error: RS2_USB_STATUS_TIMEOUT
Therefore, use the following old version SDK.
https://github.com/IntelRealSense/librealsense/tree/v1.12.1
After cloning, you can cmake like the latest version. Don't forget to open XCode after cmake, build with ʻinstall` target and have librealsense installed!
For Python integration, use this old version.
https://github.com/toinsson/pyrealsense
If you try to install with pip, the build will moss in the latest version of XCode environment. The cause is that the reference destination of stdlib of XCode has changed, so I will specify it again in setup.py.
setup.py
module = cythonize(
[Extension(
name='pyrealsense.rsutilwrapper',
sources=["pyrealsense/rsutilwrapper.pyx", "pyrealsense/rsutilwrapperc.cpp"],
libraries=['realsense'],
include_dirs=inc_dirs,
library_dirs=lib_dirs,
language="c++",
extra_compile_args=["-O3", "-stdlib=libc++"], #Add here
extra_link_args=["-stdlib=libc++"], #Add here
)])
Once edited, you can install it with python setup.py install
.
Since the depth sensor consumes a lot of power, a cheap USB-C conversion connector may start up and drop immediately.
Make sure to use something with sufficient power, such as a genuine Apple conversion connector.
that's all. Hope it helps someone!
Recommended Posts