一、驱动安装
librealsense安装
我是通过指令安装的,总的来说就是一下步骤:
-
Register the server's public key:
sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C8B3A55A6F3EFCDE
In case the public key still cannot be retrieved, check and specify proxy settings:export http_proxy="http://<proxy>:<port>"
, and rerun the command. See additional methods in the following link. -
Add the server to the list of repositories:
Ubuntu 16 LTS:sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u
-
Install the libraries (see section below if upgrading packages):
sudo apt-get install librealsense2-dkms sudo apt-get install librealsense2-utils
-
Optionally install the developer and debug packages:
sudo apt-get install librealsense2-dev
Reconnect the Intel RealSense depth camera and run: realsense-viewer
to verify the installation.
Verify that the kernel is updated :modinfo uvcvideo | grep "version:"
should include realsense
string
realsense-ros的安装
- Create a catkin workspace
-
mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src/
- Clone the latest Intel® RealSense™ ROS from here into 'catkin_ws/src/'
git clone https://github.com/IntelRealSense/realsense-ros.git
cd realsense-ros/
git checkout `git tag | sort -V | grep -P "^\d+\.\d+\.\d+" | tail -1`
cd ..
- Make sure all dependent packages are installed. You can check .travis.yml file for reference.
- Specifically, make sure that the ros package ddynamic_reconfigure is installed. If ddynamic_reconfigure cannot be installed using APT, you may clone it into your workspace 'catkin_ws/src/' from here (Version 0.2.0)
catkin_init_workspace
cd ..
catkin_make clean
catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release
catkin_make install
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
二、显示点云
1、安装rgbd_launch
cd ~/catkin_ws/src/
git clone https://github.com/ros-drivers/rgbd_launch.git
cd ..
catkin_make
2、修改launch文件
将rs_rgbd.launch和rs_camera.launch文件中的<arg name="enable_pointcloud" default="true"/>
由false改为true
3、运行RGBD
roslaunch realsense2_camera rs_rgbd.launch
三、遇到的问题
1、realsense-ros的安装需要librealsense2-dev的依赖,虽然是说是可选,但是不安装的话,realsense-ros会报错找不到librealsense的依赖
2、librealsense安装的时候可能会报错,找不到
ddynamic_reconfigure。
在GitHub中找到源码,克隆到工作空间的 src 文件夹下,就可以了。