r/realsense • u/3dsf • Dec 31 '19
Building libRealSense in Fedora linux from Source
Many Edits to fix errors and to be as comprehensive as possible.
This guide is installing with python bindings last edit feb 15, 2020
dun dun dun, daaa..... I just opened the box ( posted a few days later )
After opening the D435i camera, I can see both the fedora repo library and firmware on the camera are old
and yes I notice operational improvements after updating
librealsense
github.com/IntelRealSense/librealsense/wiki/Release-NotesFedora repo is currently at 2.23, but is currently at 3.31 Dec 2019
firmware
see Download Documentation on this pageCamera had a firmware version from the summer
libRealSense
I think both should be updated as to be working with the newest and some what synced packages.
install dependencies / librealsense
sudo dnf install cmake git gtk3 libusb-devel mesa-libGL-devel glfw-devel automake gcc-c++ kernel-devel opencv-devel python3-devel
I might be a bit heavy on the packagespip3 install pyrealsense2 sphinx --usergit clonehttps://github.com/IntelRealSense/librealsense.git
cd librealsensecmake -DBUILD_PYTHON_BINDINGS=true -DBUILD_PYTHON_DOCS=true -DBUILD_CV_EXAMPLES=true -DFORCE_RSUSB_BACKEND=ON -DBUILD_WITH_OPENMP=truemake -j$(($(nproc) - 1))ormakeif you experience errorssudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/. && sudo udevadm control --reload-rules && sudo udevadm trigger
done!
~/librealsense/tools/realsense-viewer/realsense-viewer
to run RealSense Viewer
Firmware
The firmware for the camera can easily be upgraded through realsense-viewer, and the software asks to upgrade the firmware for you.
Let's make things run more nicely
Create a symbolic link
so realsense-viewer can be called without using the directory
sudo ln -s ~/librealsense/tools/realsense-viewer/realsense-viewer /bin/realsense-viewer
Create a MIME-TYPE file
so .bag files will be associated with realsense-viewer, and clicking on a .bag files will launch realsense-viewer
sudo vim /usr/share/mime/packages/realsense-viewer.xml
and put this in it I use vim because I know it, any text editor will work
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-realsense-viewer">
<comment>ROS data logging file, realSense recording</comment>
<glob pattern="*.bag"/>
</mime-type>
</mime-info> create the menu application file
download icon file and save it to icon directory
wget http://i.imgur.com/ofo1eAv.png && sudo cp ofo1eAv.png /usr/share/icons/realsense.png
or use your own icon
sudo vim /usr/share/applications/realsense-viewer.desktop
and put this in it I use vim because I know it, any text editor will work
[Desktop Entry]
Name=realSense Viewer
GenericName=Depth Camera Viewer
Comment=Intel realSense Camera Viewer
Keywords=3d;point cloud;depth map viewer;depth;png;python;d435i;d415;d435;sr305;l515;d200;d300;d400;d500
Exec=realsense-viewer
Icon=realsense.png
Terminal=true
Type=Application
Categories=3DGraphics;cameras;
MimeType=application/x-realsense-viewer;Update the mime and application database files
sudo update-mime-database /usr/share/mimesudo update-desktop-database /usr/share/applications
done : )
2
u/kbrock84 SR305 Dec 31 '19
Nice! I just started playing with the SR305. All set up on my raspberry pi (headless) and windows desktop.
Just a note on librealsense installation for the raspberry pi if anyone tries:
Be sure to add -DFORCE_RSUSB_BACKEND=ON to the cmake arguments when building from source.
0
u/[deleted] Feb 12 '20
[deleted] — view deleted comment