SLAM之camera(Intel RealSense D435)調試第二彈:Ubuntu16.04平臺下getting started

 一、實驗環境

Camera Type

D435

Firmware Version

05.09.02.00 or 05.10.06.00

Operating System & Kernel Version

Ubuntu16.04.5 LTS        4.15.0-38-generic

SDK Version

 v2.16.4

二、dpkg方式安裝librealsense

參照文獻3給出的預編譯的dpkg安裝方式:

Using username "vslyu".
[email protected]'s password:
Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.15.0-38-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

37 packages can be updated.
0 updates are security updates.

New release '18.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

*** System restart required ***
Last login: Thu Nov  8 20:33:47 2018 from 115.156.207.38
vslyu@vslyu-SYS-7048GR-TR:~$ 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] password for vslyu:
Executing: /tmp/tmp.Jx7OW4NdBW/gpg.1.sh --keyserver
keys.gnupg.net
--recv-key
C8B3A55A6F3EFCDE
gpg: requesting key 6F3EFCDE from hkp server keys.gnupg.net
gpg: key 6F3EFCDE: public key ""CN = Intel(R) Intel(R) Realsense", O=Intel Corpo                                                                                        ration" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
vslyu@vslyu-SYS-7048GR-TR:~$

  add ppa:

sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u

 Note:if  there exists old records ,please remove it before update source:

sudo rm -f /etc/apt/sources.list.d/realsense-public.list
sudo apt-get update

update時候可能會遇到Hash sum mismatch的問題,參照文獻4

輸入modinfo uvcvideo | grep "version:"命令查看未安裝librealsense-dkms的uvcvideo的版本:

vslyu@vslyu-Lenovo-G510:~$ modinfo uvcvideo | grep "version:"
version:        1.1.1
srcversion:     DBA8F055BDC0120170B3498

install  package about DKMS and tools/demos:

sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils

輸入modinfo uvcvideo | grep "version:"命令查看安裝librealsense-dkms的uvcvideo的版本:

vslyu@vslyu-Lenovo-G510:~$ modinfo uvcvideo | grep "version:"
version:        1.1.2.realsense-1.3.3
srcversion:     C4FB5E9B212E9C39ED6CD7C

 this shows uvcvideo driver contains realsense.

三.更新固件並且驗證安裝

參照文獻5:

vslyu@vslyu-Lenovo-G510:~$ intel-realsense-dfu -b 004 -d 005 -f -i /home/vslyu/Downloads/
cmake-3.8.2/
cmake-3.8.2.tar.gz
Intel® RealSense™D400 Series Signed Production Firmware v5_10_6.zip
Signed_Image_UVC_5_10_6_0.bin
target-0.0.18.3452.mvcmd
vslyu@vslyu-Lenovo-G510:~$ intel-realsense-dfu -b 004 -d 005 -f -i /home/vslyu/Downloads/Signed_Image_UVC_5_10_6_0.bin 
D400 busnum = 4
D400 devnum = 5
D400 FW file path = /home/vslyu/Downloads/Signed_Image_UVC_5_10_6_0.bin
FW Version of .bin File   = 5.10.6.0
FW version on device = 5.9.2.0
MM FW Version = 255.255.255.255
FW update required...
Updating FW...
DFU FW version in file = 5.10.6.0
DFU_version = 60
DFU_isLocked = 0
FW_highestVersion = 0.0.0.0
FW_lastVersion = 0.0.0.0
SerialNumber = 823313022454

Percentage done: 99
Running post download processes...
.
Post download processes done.

Done!
vslyu@vslyu-Lenovo-G510:~$ intel-realsense-dfu -p
FW version on device = 5.10.6.0
MM FW Version = 255.255.255.255

以下是rs-capture的輸出:

 realsense-viewer的輸出:

注意坑的地方:

librealsense  SDK的最低固件的要求:

以下是默認firmware的版本爲05.09.20時候的輸出

errors of realsense-viewer:

this  is output of realsense-viewer:

vslyu@vslyu-Lenovo-G510:~$ realsense-viewer 
 10/11 01:04:11,371 WARNING [140415003375360] (sensor.cpp:338) Unregistered Media formats : [ UYVY ]; Supported: [ ]
 10/11 01:04:11,602 ERROR [140415323785792] (tm-context.cpp:34) Failed to create TrackingManager
 10/11 01:04:16,408 WARNING [140415003375360] (types.cpp:57) set_pu(id=9) failed! Last Error: Input/output error
 10/11 01:04:16,408 WARNING [140415003375360] (sensor.cpp:722) Exception was thrown when inspecting properties of a sensor
 10/11 01:04:16,408 ERROR [140415003375360] (types.h:180) xioctl(VIDIOC_G_CTRL) failed Last Error: Invalid argument
 10/11 01:04:16,408 WARNING [140415003375360] (sensor.cpp:722) Exception was thrown when inspecting properties of a sensor

 Turn on camera :

 10/11 01:05:40,339 WARNING [140414879258368] (backend-v4l2.cpp:1013) Frames didn't arrived within 5 seconds
 10/11 01:05:41,304 WARNING [140414862472960] (backend-v4l2.cpp:1013) Frames didn't arrived within 5 seconds

outputs of rs-capture

vslyu@vslyu-Lenovo-G510:~$ rs-capture
 10/11 01:06:54,213 ERROR [140440987621184] (types.h:180) xioctl(VIDIOC_S_FMT) failed Last Error: Device or resource busy
RealSense error calling rs2_pipeline_start(pipe:0x247c6c0):
    xioctl(VIDIOC_S_FMT) failed Last Error: Device or resource busy

因爲之前在Win10系統下同樣版本的05.09.20固件與SDK也能夠運行,所以一直在糾結是不是安裝出了問題,參看issues/2639更新固件即可,另外固件更新時候需要查看設備的USB總線上的編號,附上參考7的方法。

參考文獻與資料:

  1. https://software.intel.com/en-us/realsense/d400/get-started
  2. https://github.com/IntelRealSense/librealsense/releases/latest
  3. https://github.com/IntelRealSense/librealsense/blob/development/doc/distribution_linux.md
  4. Ubuntu16.04下APT Hash sum mismatch錯誤的常見解決方法總結
  5. https://downloadcenter.intel.com/download/28237/Latest-Firmware-for-Intel-RealSense-D400-Product-Family
  6. https://github.com/IntelRealSense/librealsense/issues/2639
  7. linux查看設備usb版本號
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章