Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture Color and Depth on Google Coral Dev Board #7646

Closed
MinPopp opened this issue Oct 25, 2020 · 5 comments
Closed

Capture Color and Depth on Google Coral Dev Board #7646

MinPopp opened this issue Oct 25, 2020 · 5 comments

Comments

@MinPopp
Copy link

MinPopp commented Oct 25, 2020


Required Info
Camera Model D435
Firmware Version 05.12.08.200
Operating System & Version Linux Mendel
Kernel Version (Linux Only) 4.14.98-imx
Platform Google Coral Dev Board
SDK Version v2.39.0
Language python3 / -
Segment others

Issue Description

I would like to capture depth and color frames with the D435 on the Google Coral Dev board. I sucessfully built librealsense from source, but i do not succeed in patching the kernel for the version 4.14.98. Is there any way of getting the camera to run on the board? My goal is to be able to interact with the camera using python3. Here is described that the camera should be able to run without the kernel patch. How can I achieve this?

Below you see the log output of modprobe ucvideo the Coral Dev Board:

mendel@orange-goose:~$ sudo modprobe ucvideo
modprobe: FATAL: Module ucvideo not found in directory /lib/modules/4.14.98-imx

I assume that this is where the problem is. Nonetheless below is some more info from the board:

rs-enumerate-devices
mendel@orange-goose:~$ rs-enumerate-devices
Device info:
    Name                          : 	Intel RealSense D435
    Serial Number                 : 	815412070329
    Firmware Version              : 	05.12.08.200
    Recommended Firmware Version  : 	05.12.08.200
    Physical Port                 : 	/sys/devices/platform/usb@38200000/38200000.dwc3/xhci-hcd.0.auto/usb2/2-1/2-1:1.0/video4linux/video1
    Debug Op Code                 : 	15
    Advanced Mode                 : 	YES
    Product Id                    : 	0B07
    Camera Locked                 : 	YES
    Usb Type Descriptor           : 	3.2
    Product Line                  : 	D400
    Asic Serial Number            : 	812113021027
    Firmware Update Id            : 	812113021027

Stream Profiles supported by Stereo Module
 Supported modes:
    stream       resolution      fps       format
    Infrared 1	  1280x800	@ 30Hz	   Y8
    Infrared 1	  1280x800	@ 25Hz	   Y16
    Infrared 1	  1280x800	@ 15Hz	   Y16
    Infrared 1	  1280x800	@ 15Hz	   Y8
    Infrared 1	  1280x720	@ 30Hz	   Y8
    Infrared 1	  1280x720	@ 15Hz	   Y8
    Infrared 1	  1280x720	@ 6Hz	   Y8
    Infrared 1	  848x480	@ 90Hz	   Y8
    Infrared 1	  848x480	@ 60Hz	   Y8
    Infrared 1	  848x480	@ 30Hz	   Y8
    Infrared 1	  848x480	@ 15Hz	   Y8
    Infrared 1	  848x480	@ 6Hz	   Y8
    Infrared 1	  848x100	@ 300Hz	   Y8
    Infrared 1	  848x100	@ 100Hz	   Y8
    Infrared 1	  640x480	@ 90Hz	   Y8
    Infrared 1	  640x480	@ 60Hz	   Y8
    Infrared 1	  640x480	@ 30Hz	   Y8
    Infrared 1	  640x480	@ 15Hz	   Y8
    Infrared 1	  640x480	@ 6Hz	   Y8
    Infrared 1	  640x400	@ 25Hz	   Y16
    Infrared 1	  640x400	@ 15Hz	   Y16
    Infrared 1	  640x360	@ 90Hz	   Y8
    Infrared 1	  640x360	@ 60Hz	   Y8
    Infrared 1	  640x360	@ 30Hz	   Y8
    Infrared 1	  640x360	@ 15Hz	   Y8
    Infrared 1	  640x360	@ 6Hz	   Y8
    Infrared 1	  480x270	@ 90Hz	   Y8
    Infrared 1	  480x270	@ 60Hz	   Y8
    Infrared 1	  480x270	@ 30Hz	   Y8
    Infrared 1	  480x270	@ 15Hz	   Y8
    Infrared 1	  480x270	@ 6Hz	   Y8
    Infrared 1	  424x240	@ 90Hz	   Y8
    Infrared 1	  424x240	@ 60Hz	   Y8
    Infrared 1	  424x240	@ 30Hz	   Y8
    Infrared 1	  424x240	@ 15Hz	   Y8
    Infrared 1	  424x240	@ 6Hz	   Y8
    Infrared 1	  256x144	@ 300Hz	   Y8
    Infrared 1	  256x144	@ 90Hz	   Y8
    Infrared 2	  1280x800	@ 30Hz	   Y8
    Infrared 2	  1280x800	@ 25Hz	   Y16
    Infrared 2	  1280x800	@ 15Hz	   Y16
    Infrared 2	  1280x800	@ 15Hz	   Y8
    Infrared 2	  1280x720	@ 30Hz	   Y8
    Infrared 2	  1280x720	@ 15Hz	   Y8
    Infrared 2	  1280x720	@ 6Hz	   Y8
    Infrared 2	  848x480	@ 90Hz	   Y8
    Infrared 2	  848x480	@ 60Hz	   Y8
    Infrared 2	  848x480	@ 30Hz	   Y8
    Infrared 2	  848x480	@ 15Hz	   Y8
    Infrared 2	  848x480	@ 6Hz	   Y8
    Infrared 2	  848x100	@ 300Hz	   Y8
    Infrared 2	  848x100	@ 100Hz	   Y8
    Infrared 2	  640x480	@ 90Hz	   Y8
    Infrared 2	  640x480	@ 60Hz	   Y8
    Infrared 2	  640x480	@ 30Hz	   Y8
    Infrared 2	  640x480	@ 15Hz	   Y8
    Infrared 2	  640x480	@ 6Hz	   Y8
    Infrared 2	  640x400	@ 25Hz	   Y16
    Infrared 2	  640x400	@ 15Hz	   Y16
    Infrared 2	  640x360	@ 90Hz	   Y8
    Infrared 2	  640x360	@ 60Hz	   Y8
    Infrared 2	  640x360	@ 30Hz	   Y8
    Infrared 2	  640x360	@ 15Hz	   Y8
    Infrared 2	  640x360	@ 6Hz	   Y8
    Infrared 2	  480x270	@ 90Hz	   Y8
    Infrared 2	  480x270	@ 60Hz	   Y8
    Infrared 2	  480x270	@ 30Hz	   Y8
    Infrared 2	  480x270	@ 15Hz	   Y8
    Infrared 2	  480x270	@ 6Hz	   Y8
    Infrared 2	  424x240	@ 90Hz	   Y8
    Infrared 2	  424x240	@ 60Hz	   Y8
    Infrared 2	  424x240	@ 30Hz	   Y8
    Infrared 2	  424x240	@ 15Hz	   Y8
    Infrared 2	  424x240	@ 6Hz	   Y8
    Infrared 2	  256x144	@ 300Hz	   Y8
    Infrared 2	  256x144	@ 90Hz	   Y8
    Depth	  1280x720	@ 30Hz	   Z16
    Depth	  1280x720	@ 15Hz	   Z16
    Depth	  1280x720	@ 6Hz	   Z16
    Depth	  848x480	@ 90Hz	   Z16
    Depth	  848x480	@ 60Hz	   Z16
    Depth	  848x480	@ 30Hz	   Z16
    Depth	  848x480	@ 15Hz	   Z16
    Depth	  848x480	@ 6Hz	   Z16
    Depth	  848x100	@ 300Hz	   Z16
    Depth	  848x100	@ 100Hz	   Z16
    Depth	  640x480	@ 90Hz	   Z16
    Depth	  640x480	@ 60Hz	   Z16
    Depth	  640x480	@ 30Hz	   Z16
    Depth	  640x480	@ 15Hz	   Z16
    Depth	  640x480	@ 6Hz	   Z16
    Depth	  640x360	@ 90Hz	   Z16
    Depth	  640x360	@ 60Hz	   Z16
    Depth	  640x360	@ 30Hz	   Z16
    Depth	  640x360	@ 15Hz	   Z16
    Depth	  640x360	@ 6Hz	   Z16
    Depth	  480x270	@ 90Hz	   Z16
    Depth	  480x270	@ 60Hz	   Z16
    Depth	  480x270	@ 30Hz	   Z16
    Depth	  480x270	@ 15Hz	   Z16
    Depth	  480x270	@ 6Hz	   Z16
    Depth	  424x240	@ 90Hz	   Z16
    Depth	  424x240	@ 60Hz	   Z16
    Depth	  424x240	@ 30Hz	   Z16
    Depth	  424x240	@ 15Hz	   Z16
    Depth	  424x240	@ 6Hz	   Z16
    Depth	  256x144	@ 300Hz	   Z16
    Depth	  256x144	@ 90Hz	   Z16

Stream Profiles supported by RGB Camera
 Supported modes:
    stream       resolution      fps       format
    Color	  1920x1080	@ 30Hz	   RGB8
    Color	  1920x1080	@ 30Hz	   Y16
    Color	  1920x1080	@ 30Hz	   BGRA8
    Color	  1920x1080	@ 30Hz	   RGBA8
    Color	  1920x1080	@ 30Hz	   BGR8
    Color	  1920x1080	@ 30Hz	   YUYV
    Color	  1920x1080	@ 15Hz	   RGB8
    Color	  1920x1080	@ 15Hz	   Y16
    Color	  1920x1080	@ 15Hz	   BGRA8
    Color	  1920x1080	@ 15Hz	   RGBA8
    Color	  1920x1080	@ 15Hz	   BGR8
    Color	  1920x1080	@ 15Hz	   YUYV
    Color	  1920x1080	@ 6Hz	   RGB8
    Color	  1920x1080	@ 6Hz	   Y16
    Color	  1920x1080	@ 6Hz	   BGRA8
    Color	  1920x1080	@ 6Hz	   RGBA8
    Color	  1920x1080	@ 6Hz	   BGR8
    Color	  1920x1080	@ 6Hz	   YUYV
    Color	  1280x720	@ 30Hz	   RGB8
    Color	  1280x720	@ 30Hz	   Y16
    Color	  1280x720	@ 30Hz	   BGRA8
    Color	  1280x720	@ 30Hz	   RGBA8
    Color	  1280x720	@ 30Hz	   BGR8
    Color	  1280x720	@ 30Hz	   YUYV
    Color	  1280x720	@ 15Hz	   RGB8
    Color	  1280x720	@ 15Hz	   Y16
    Color	  1280x720	@ 15Hz	   BGRA8
    Color	  1280x720	@ 15Hz	   RGBA8
    Color	  1280x720	@ 15Hz	   BGR8
    Color	  1280x720	@ 15Hz	   YUYV
    Color	  1280x720	@ 6Hz	   RGB8
    Color	  1280x720	@ 6Hz	   Y16
    Color	  1280x720	@ 6Hz	   BGRA8
    Color	  1280x720	@ 6Hz	   RGBA8
    Color	  1280x720	@ 6Hz	   BGR8
    Color	  1280x720	@ 6Hz	   YUYV
    Color	  960x540	@ 60Hz	   RGB8
    Color	  960x540	@ 60Hz	   Y16
    Color	  960x540	@ 60Hz	   BGRA8
    Color	  960x540	@ 60Hz	   RGBA8
    Color	  960x540	@ 60Hz	   BGR8
    Color	  960x540	@ 60Hz	   YUYV
    Color	  960x540	@ 30Hz	   RGB8
    Color	  960x540	@ 30Hz	   Y16
    Color	  960x540	@ 30Hz	   BGRA8
    Color	  960x540	@ 30Hz	   RGBA8
    Color	  960x540	@ 30Hz	   BGR8
    Color	  960x540	@ 30Hz	   YUYV
    Color	  960x540	@ 15Hz	   RGB8
    Color	  960x540	@ 15Hz	   Y16
    Color	  960x540	@ 15Hz	   BGRA8
    Color	  960x540	@ 15Hz	   RGBA8
    Color	  960x540	@ 15Hz	   BGR8
    Color	  960x540	@ 15Hz	   YUYV
    Color	  960x540	@ 6Hz	   RGB8
    Color	  960x540	@ 6Hz	   Y16
    Color	  960x540	@ 6Hz	   BGRA8
    Color	  960x540	@ 6Hz	   RGBA8
    Color	  960x540	@ 6Hz	   BGR8
    Color	  960x540	@ 6Hz	   YUYV
    Color	  848x480	@ 60Hz	   RGB8
    Color	  848x480	@ 60Hz	   Y16
    Color	  848x480	@ 60Hz	   BGRA8
    Color	  848x480	@ 60Hz	   RGBA8
    Color	  848x480	@ 60Hz	   BGR8
    Color	  848x480	@ 60Hz	   YUYV
    Color	  848x480	@ 30Hz	   RGB8
    Color	  848x480	@ 30Hz	   Y16
    Color	  848x480	@ 30Hz	   BGRA8
    Color	  848x480	@ 30Hz	   RGBA8
    Color	  848x480	@ 30Hz	   BGR8
    Color	  848x480	@ 30Hz	   YUYV
    Color	  848x480	@ 15Hz	   RGB8
    Color	  848x480	@ 15Hz	   Y16
    Color	  848x480	@ 15Hz	   BGRA8
    Color	  848x480	@ 15Hz	   RGBA8
    Color	  848x480	@ 15Hz	   BGR8
    Color	  848x480	@ 15Hz	   YUYV
    Color	  848x480	@ 6Hz	   RGB8
    Color	  848x480	@ 6Hz	   Y16
    Color	  848x480	@ 6Hz	   BGRA8
    Color	  848x480	@ 6Hz	   RGBA8
    Color	  848x480	@ 6Hz	   BGR8
    Color	  848x480	@ 6Hz	   YUYV
    Color	  640x480	@ 60Hz	   RGB8
    Color	  640x480	@ 60Hz	   Y16
    Color	  640x480	@ 60Hz	   BGRA8
    Color	  640x480	@ 60Hz	   RGBA8
    Color	  640x480	@ 60Hz	   BGR8
    Color	  640x480	@ 60Hz	   YUYV
    Color	  640x480	@ 30Hz	   RGB8
    Color	  640x480	@ 30Hz	   Y16
    Color	  640x480	@ 30Hz	   BGRA8
    Color	  640x480	@ 30Hz	   RGBA8
    Color	  640x480	@ 30Hz	   BGR8
    Color	  640x480	@ 30Hz	   YUYV
    Color	  640x480	@ 15Hz	   RGB8
    Color	  640x480	@ 15Hz	   Y16
    Color	  640x480	@ 15Hz	   BGRA8
    Color	  640x480	@ 15Hz	   RGBA8
    Color	  640x480	@ 15Hz	   BGR8
    Color	  640x480	@ 15Hz	   YUYV
    Color	  640x480	@ 6Hz	   RGB8
    Color	  640x480	@ 6Hz	   Y16
    Color	  640x480	@ 6Hz	   BGRA8
    Color	  640x480	@ 6Hz	   RGBA8
    Color	  640x480	@ 6Hz	   BGR8
    Color	  640x480	@ 6Hz	   YUYV
    Color	  640x360	@ 60Hz	   RGB8
    Color	  640x360	@ 60Hz	   Y16
    Color	  640x360	@ 60Hz	   BGRA8
    Color	  640x360	@ 60Hz	   RGBA8
    Color	  640x360	@ 60Hz	   BGR8
    Color	  640x360	@ 60Hz	   YUYV
    Color	  640x360	@ 30Hz	   RGB8
    Color	  640x360	@ 30Hz	   Y16
    Color	  640x360	@ 30Hz	   BGRA8
    Color	  640x360	@ 30Hz	   RGBA8
    Color	  640x360	@ 30Hz	   BGR8
    Color	  640x360	@ 30Hz	   YUYV
    Color	  640x360	@ 15Hz	   RGB8
    Color	  640x360	@ 15Hz	   Y16
    Color	  640x360	@ 15Hz	   BGRA8
    Color	  640x360	@ 15Hz	   RGBA8
    Color	  640x360	@ 15Hz	   BGR8
    Color	  640x360	@ 15Hz	   YUYV
    Color	  640x360	@ 6Hz	   RGB8
    Color	  640x360	@ 6Hz	   Y16
    Color	  640x360	@ 6Hz	   BGRA8
    Color	  640x360	@ 6Hz	   RGBA8
    Color	  640x360	@ 6Hz	   BGR8
    Color	  640x360	@ 6Hz	   YUYV
    Color	  424x240	@ 60Hz	   RGB8
    Color	  424x240	@ 60Hz	   Y16
    Color	  424x240	@ 60Hz	   BGRA8
    Color	  424x240	@ 60Hz	   RGBA8
    Color	  424x240	@ 60Hz	   BGR8
    Color	  424x240	@ 60Hz	   YUYV
    Color	  424x240	@ 30Hz	   RGB8
    Color	  424x240	@ 30Hz	   Y16
    Color	  424x240	@ 30Hz	   BGRA8
    Color	  424x240	@ 30Hz	   RGBA8
    Color	  424x240	@ 30Hz	   BGR8
    Color	  424x240	@ 30Hz	   YUYV
    Color	  424x240	@ 15Hz	   RGB8
    Color	  424x240	@ 15Hz	   Y16
    Color	  424x240	@ 15Hz	   BGRA8
    Color	  424x240	@ 15Hz	   RGBA8
    Color	  424x240	@ 15Hz	   BGR8
    Color	  424x240	@ 15Hz	   YUYV
    Color	  424x240	@ 6Hz	   RGB8
    Color	  424x240	@ 6Hz	   Y16
    Color	  424x240	@ 6Hz	   BGRA8
    Color	  424x240	@ 6Hz	   RGBA8
    Color	  424x240	@ 6Hz	   BGR8
    Color	  424x240	@ 6Hz	   YUYV
    Color	  320x240	@ 60Hz	   RGB8
    Color	  320x240	@ 60Hz	   Y16
    Color	  320x240	@ 60Hz	   BGRA8
    Color	  320x240	@ 60Hz	   RGBA8
    Color	  320x240	@ 60Hz	   BGR8
    Color	  320x240	@ 60Hz	   YUYV
    Color	  320x240	@ 30Hz	   RGB8
    Color	  320x240	@ 30Hz	   Y16
    Color	  320x240	@ 30Hz	   BGRA8
    Color	  320x240	@ 30Hz	   RGBA8
    Color	  320x240	@ 30Hz	   BGR8
    Color	  320x240	@ 30Hz	   YUYV
    Color	  320x240	@ 6Hz	   RGB8
    Color	  320x240	@ 6Hz	   Y16
    Color	  320x240	@ 6Hz	   BGRA8
    Color	  320x240	@ 6Hz	   RGBA8
    Color	  320x240	@ 6Hz	   BGR8
    Color	  320x240	@ 6Hz	   YUYV
    Color	  320x180	@ 60Hz	   RGB8
    Color	  320x180	@ 60Hz	   Y16
    Color	  320x180	@ 60Hz	   BGRA8
    Color	  320x180	@ 60Hz	   RGBA8
    Color	  320x180	@ 60Hz	   BGR8
    Color	  320x180	@ 60Hz	   YUYV
    Color	  320x180	@ 30Hz	   RGB8
    Color	  320x180	@ 30Hz	   Y16
    Color	  320x180	@ 30Hz	   BGRA8
    Color	  320x180	@ 30Hz	   RGBA8
    Color	  320x180	@ 30Hz	   BGR8
    Color	  320x180	@ 30Hz	   YUYV
    Color	  320x180	@ 6Hz	   RGB8
    Color	  320x180	@ 6Hz	   Y16
    Color	  320x180	@ 6Hz	   BGRA8
    Color	  320x180	@ 6Hz	   RGBA8
    Color	  320x180	@ 6Hz	   BGR8
    Color	  320x180	@ 6Hz	   YUYV
rs-record
mendel@orange-goose:~$ rs-record
RealSense error calling rs2_pipeline_start_with_config_and_callback_cpp(pipe:0xaaaafa14f7a0, config:0xaaaafa12f060, callback:0xaaaafa14f740):

Failed to resolve the request:
	Format: Z16, width: 848, height: 480

Into:
	Formats:
	 Z16
tail of dmesg
[ 2408.093707] usb 2-1: new SuperSpeed USB device number 4 using xhci-hcd
[ 2408.134139] uvcvideo: Unknown video format 00000050-0000-0010-8000-00aa00389b71
[ 2408.141499] uvcvideo: Unknown video format 00000032-0000-0010-8000-00aa00389b71
[ 2408.149603] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) Depth Camera 435  (8086:0b07)
[ 2408.181295] uvcvideo: Unable to create debugfs 2-4 directory.
[ 2408.187720] uvcvideo 2-1:1.0: Entity type for entity Intel(R) RealSense(TM) Depth Ca was not initialized!
[ 2408.197473] uvcvideo 2-1:1.0: Entity type for entity Processing 2 was not initialized!
[ 2408.205573] uvcvideo 2-1:1.0: Entity type for entity Camera 1 was not initialized!
[ 2408.214003] input: Intel(R) RealSense(TM) Depth Ca as /devices/platform/usb@38200000/38200000.dwc3/xhci-hcd.0.auto/usb2/2-1/2-1:1.0/input/input3
[ 2408.229370] uvcvideo: Unknown video format 36315752-1a66-a242-9065-d01814a8ef8a
[ 2408.236762] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) Depth Camera 435  (8086:0b07)
[ 2408.257388] uvcvideo: Unable to create debugfs 2-4 directory.
[ 2408.264154] uvcvideo 2-1:1.3: Entity type for entity Processing 7 was not initialized!
[ 2408.272301] uvcvideo 2-1:1.3: Entity type for entity Extension 8 was not initialized!
[ 2408.280387] uvcvideo 2-1:1.3: Entity type for entity Camera 6 was not initialized!
@MartyG-RealSense
Copy link
Collaborator

Hi @MinPopp It is possible to build librealsense from source code with a method called RSUSB that is not dependent on Linux versions or kernel versions and does not require patching. The link below has instructions for building librealsense and the Python wrapper from source at the same time using the RSUSB method. Performing the method requires an internet connection.

#6964 (comment)

There are both advantages and disadvantages to using the RSUSB method. For example, it enables quick setup and prototyping but may not be suited to a commercial project. For more information, please visit the link below and scroll down through the linked-to comment to the section headed What are the advantages and disadvantages of using libuvc vs patched kernel modules?

#5212 (comment)

@MinPopp
Copy link
Author

MinPopp commented Oct 25, 2020

Thank you for your reply. I started make and will report back once it (hopefully) worked. It's pretty slow on the board so it might be a day or two

@MartyG-RealSense
Copy link
Collaborator

Thanks very much for the update - good luck, and I look forward to your report.

@MinPopp
Copy link
Author

MinPopp commented Oct 28, 2020

Thank you so much @MartyG-RealSense , that worked like a charm!

Because I spent quite some time figuring out how I get the D435 camera to run on the Coral Dev Board I share what worked for me, hoping it helps somebody else.

Step 0: prerequisites

Before you start, be sure to place the board somewhere it doesn't bother you even if the fan is spinning!

After the board runs as described here, install the following prerequisites. I am not sure if all of these are needed. It is what I installed, so it might not work if one of them is missing

sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install xorg-dev libglu1-mesa-dev
sudo apt-get install libssl-dev
sudo apt-get install python3-dev

Step 1: swapfile

The building process requires more than 1GB of ram. So you have to create a swapfile, as it is described here. I made mine 8G just to be sure it is big enough. I did not move my home folder on the sd-card.

Step 2: cmake

The cmake version on the coral board did not work for me and there was no newer version available with apt. So I had to build it myself:

wget https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4.tar.gz
tar -xf cmake-3.18.4.tar.gz
cd cmake-3.18.4/
./configure                       # takes a while
make                              # takes a while
sudo make install

Step 3: librealsense

Build realsense how it is described here, but with a few changes to the cmake command because I did not want the graphical examples and because cuda is not compatible with the board (i think?)

wget https://github.com/IntelRealSense/librealsense/archive/master.zip
unzip master.zip
cd librealsense-master
mkdir build
cd build
cmake ../ -DBUILD_PYTHON_BINDINGS:bool=true -DFORCE_RSUSB_BACKEND:bool=true -DBUILD_WITH_CUDA:bool=false -DBUILD_GRAPHICAL_EXAMPLES:bool=false
make -j4 #might take almost a day
sudo make install

Apply the udev rules

sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger

For the python-stuff to work properly I had to copy the __init__.py file from the git-repo to the python3-folder as follows. The first path depends on where you unpacked the git repo.

sudo cp ~/librealsense-master/wrappers/python/pyrealsense2/__init__.py /usr/lib/python3/dist-packages/pyrealsense2/

Step 4: opencv (optional)

OpenCV is in not required for this to work but I wanted to install it and it didn't work with pip, so here is how I did it. I followed mainly this article but without the virtual environment (not recommended) and minus some steps that were already done before:

wget -O opencv.tar.gz https://github.com/opencv/opencv/archive/4.4.0.tar.gz
wget -O opencv-contrib.tar.gz https://github.com/opencv/opencv_contrib/archive/4.4.0.tar.gz
tar -xf opencv.tar.gz
tar -xf opencv-contrib.tar.gz
cd opencv-4.4.0
mkdir build
cd build
 # OPENCV_EXTRA_MODULES_PATH has to be replaced with your download path!
cmake -D CMAKE_BUILD_TYPE=RELEASE \
 -D INSTALL_PYTHON_EXAMPLES=ON \
 -D INSTALL_C_EXAMPLES=OFF \
 -D OPENCV_ENABLE_NONFREE=ON \
 -D OPENCV_EXTRA_MODULES_PATH=/home/mendel/mnt/installation_cv2/opencv_contrib-4.4.0/modules \
 -D ENABLE_FAST_MATH=1 \
 -D ENABLE_NEON=ON -D WITH_LIBV4L=ON \
 -D WITH_V4L=ON \
 -D BUILD_EXAMPLES=ON ..
 make #takes >5h
 sudo make install
 sudo ldconfig

@MinPopp MinPopp closed this as completed Oct 28, 2020
@MartyG-RealSense
Copy link
Collaborator

Thanks so much @MinPopp - guides such as these that are kindly contributed by RealSense community members are really helpful to others in future who are using the same equipment. :) It's great news that you were successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants