TB3 Install ROS RealSense 2
Contents
Reference
Prerequisites
- Skipped section 2 on prerequisites. I may have to come back to this later.
- TB3 Upgrading Realsense D415 Camera. It did not function properly in this environment without doing this.
Installing librealsense2
References
Install
sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C8B3A55A6F3EFCDE sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u
sudo apt-get install librealsense2-dkms DKMS: install completed. Loading the modified modules into kernel... complete Current status: librealsense2-dkms, 1.3.4, 4.15.0-43-generic, x86_64: installed mod: videodev version: realsense2-dkms mod: uvcvideo version: 1.1.2.realsense-1.3.4 mod: hid_sensor_gyro_3d version: realsense2-dkms mod: hid_sensor_accel_3d version: realsense2-dkms Setting up librealsense2-udev-rules:amd64 (2.17.1-0~realsense0.372) ... Processing triggers for shim-signed (1.33.1~16.04.1+13-0ubuntu2) ... Secure Boot not enabled on this system.
sudo apt-get install librealsense2-utils Unpacking librealsense2-utils:amd64 (2.17.1-0~realsense0.372) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... Processing triggers for doc-base (0.10.7) ... Processing 1 added doc-base file... Processing triggers for install-info (6.1.0.dfsg.1-5) ... Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu4.1) ... Setting up libdbus-1-dev:amd64 (1.10.6-1ubuntu3.3) ... Setting up x11proto-record-dev (1.14.2-1) ... Setting up libxtst-dev:amd64 (2:1.2.2-1) ... Setting up libatspi2.0-dev (2.18.3-4ubuntu1) ... Setting up libatk-bridge2.0-dev:amd64 (2.18.1-2ubuntu1) ... Setting up libepoxy-dev:amd64 (1.3.1-1ubuntu0.16.04.2) ... Setting up libglfw3:amd64 (3.1.2-3) ... Setting up libgmpxx4ldbl:amd64 (2:6.1.0+dfsg-2) ... Setting up libgmp-dev:amd64 (2:6.1.0+dfsg-2) ... Setting up nettle-dev (3.2-1ubuntu0.16.04.1) ... Setting up libgtk-3-dev:amd64 (3.18.9-1ubuntu3.3) ... Setting up librealsense2:amd64 (2.17.1-0~realsense0.372) ... Setting up librealsense2-utils:amd64 (2.17.1-0~realsense0.372) ... Processing triggers for libc-bin (2.23-0ubuntu10) ...
Verified because the following include realsense string.
modinfo uvcvideo | grep "version:" version: 1.1.2.realsense-1.3.4 srcversion: C4FB5E9B212E9C39ED6CD7C
The optionally developer and debug packages must me installed for Step 3 to work. If note, *.cmake files cannot be found.
sudo apt-get install librealsense2-dev sudo apt-get install librealsense2-dbg
Tests
Capable viewer
$ realsense-viewer 31/01 20:25:36,668 WARNING [140598239259200] (backend-hid.cpp:1162) Failed to read busnum/devnum. Custom HID Device Path: /sys/bus/platform/drivers/hid_sensor_custom/HID-SENSOR-2000e1.22.auto 31/01 20:25:36,668 WARNING [140598239259200] (backend-hid.cpp:1162) Failed to read busnum/devnum. Custom HID Device Path: /sys/bus/platform/drivers/hid_sensor_custom/HID-SENSOR-2000e1.10.auto
It works but I get the WARNING messages above. The following are not helpful.
- librealsense / ros-wrapper issue - Failed to read busnum/devnum. #1095
- Failed to read busnum/devnum
- Cannot run ROS more than once with D415
Point Cloud
$ rs-pointcloud
Simple interface
$ rs-capture #### RS Frame Rate Printer #### Depth[0]: 27.8/30 [FPS] || Color[0]: 15.0/30 [FPS] ||
Others
Look in the util package in the next section.
Install Results
$ sudo aptitude search librealsense2 [sudo] password for eepp: i A librealsense2 - Intel(R) RealSense(tm) Cross Platform API i librealsense2-dbg - Intel(R) RealSense(tm) Camera Capture API i librealsense2-dev - Intel(R) RealSense(tm) Camera Capture API i librealsense2-dkms - Modified kernel modules for librealsense2 i A librealsense2-udev-rules - Intel(R) RealSense(tm) Camera Capture API i librealsense2-utils - Intel(R) RealSense(tm) Camera Capture API $ dpkg -L librealsense2 /. /usr /usr/share /usr/share/doc /usr/share/doc/librealsense2 /usr/share/doc/librealsense2/copyright /usr/share/doc/librealsense2/changelog.Debian.gz /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/librealsense2.so.2.18.0 /usr/lib/x86_64-linux-gnu/librealsense2.so.2 $ dpkg -L librealsense2-utils /. /usr /usr/share /usr/share/doc /usr/share/doc/librealsense2-utils /usr/share/doc/librealsense2-utils/copyright /usr/share/doc/librealsense2-utils/changelog.Debian.gz /usr/bin /usr/bin/rs-terminal /usr/bin/rs-depth /usr/bin/realsense-viewer /usr/bin/rs-multicam /usr/bin/rs-distance /usr/bin/rs-depth-quality /usr/bin/rs-fw-logger /usr/bin/rs-color /usr/bin/rs-convert /usr/bin/rs-enumerate-devices /usr/bin/rs-rosbag-inspector /usr/bin/rs-capture /usr/bin/rs-sensor-control /usr/bin/rs-save-to-disk /usr/bin/rs-measure /usr/bin/rs-pointcloud /usr/bin/rs-record-playback /usr/bin/rs-callback /usr/bin/rs-post-processing /usr/bin/rs-align /usr/bin/rs-data-collect /usr/bin/rs-software-device
Debug
$ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 04f3:2494 Elan Microelectronics Corp. Bus 001 Device 004: ID 8087:0a2a Intel Corp. Bus 001 Device 003: ID 0bda:58c2 Realtek Semiconductor Corp. Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The first line, "3.0 root hub", says we are working with USB3 on bus 002
After plugging in the D415
$ lsusb Bus 002 Device 002: ID 8086:0ad3 Intel Corp. Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 04f3:2494 Elan Microelectronics Corp. Bus 001 Device 004: ID 8087:0a2a Intel Corp. Bus 001 Device 003: ID 0bda:58c2 Realtek Semiconductor Corp. Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
After plugging in the ZR300
$ lsusb Bus 002 Device 003: ID 8086:0ad0 Intel Corp. Bus 002 Device 004: ID 8086:0acb Intel Corp. Bus 002 Device 002: ID 0451:8025 Texas Instruments, Inc. Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 04f3:2494 Elan Microelectronics Corp. Bus 001 Device 004: ID 8087:0a2a Intel Corp. Bus 001 Device 003: ID 0bda:58c2 Realtek Semiconductor Corp. Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 001 Device 006: ID 0451:8027 Texas Instruments, Inc. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Installing ROS Wrapper for the realsense2_camera
References
- ROS realsense 2 camera. This is the ROS reference page.
- ROS RealSense2 Wrapper. This contains the instructions followed below.
Step 1: From Debian Packages: Install Latest SDK 2.0
Done See TB3_Install_ROS_RealSense_2#Installing_librealsense2 above. Installed from Debian Package.
Step 2: Install ROS Distribution
Done Sisters_Install_ROS
Step 3: Install Intel RealSense ROS from Sources
Notice the optional note in Step 1.
cd src/ git clone https://github.com/intel-ros/realsense cd .. catkin_make
POTENTIAL ALTERNATIVE TO ABOVE. Zip file is found here Intel ROS Realsens releases
cd src mv ~/Downloads/realsense-2.1.3.zip . SHOULD BE 2.1.4 unzip realsense-2.1.3.zi cd .. catkin_make
plugged in the D415.
Tests
Test 1
TBD need to figure out how to configure rviz
Terminal 1
roscore
Terminal 2
roslaunch realsense2_camera rs_camera.launch
Terminal 3 - rviz howto?
rviz
or
rosrun image_view image_view image:=/camera/color/image_raw
or
rosrun image_view image_view image:=/camera/depth/image_rect_raw
Use the following for other topics
rostopic list
Reference
Demo
Preconditions
plugged in the D415.
Terminal 1
roscore
Terminal 2
This is really cool
$ roslaunch realsense2_camera demo_pointcloud.launch
Doc
Fix Link
Intel-RealSense-SDK2-Github-Guide.pdf find Intel-RealSense-SDK2-Github-Guide.pdf --