-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Comments
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. 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? |
Thank you for your reply. I started |
Thanks very much for the update - good luck, and I look forward to your report. |
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: prerequisitesBefore 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: swapfileThe 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: cmakeThe 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: librealsenseBuild 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 |
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. |
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:I assume that this is where the problem is. Nonetheless below is some more info from the board:
rs-enumerate-devices
rs-record
tail of dmesg
The text was updated successfully, but these errors were encountered: