Ubuntu 16.04 + Realsense D435i + ROS 开发

Ubuntu 16.04 + Realsense D435i + ROS 开发
https://www.cnblogs.com/dinghongkai/p/11300167.html
参考:

[1] Realsense-Ros: https://github.com/IntelRealSense/realsense-ros#installation-instructions

[2] librealsense: https://github.com/IntelRealSense/librealsense

注意:realsense-ros 要和 librealsense 版本匹配,realsense-ros 最新 release 为 2.2.7,Supported Realsense SDK 为 librealsense 2.24 .0

  1. 源码安装 librealsense

参考:https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md

更新系统
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
下载源码
git 下载
git clone https://github.com/IntelRealSense/librealsense.git
或手动下载:https://github.com/IntelRealSense/librealsense/archive/master.zip
若有 realsense 连接,先unplug,安装依赖
sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev
ubuntu 16.04
sudo apt-get install libglfw3-dev
安装包根目录,run Intel Realsense permissions script
./scripts/setup_udev_rules.sh
Download, patch and build realsense-affected kernel modules (drivers)
./scripts/patch-realsense-ubuntu-lts.sh
编译安装
mkdir build && cd build
cmake …/ -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=true
sudo make uninstall && make clean && make -j8 && sudo make install
The shared object will be installed in /usr/local/lib, header files in /usr/local/include.
The binary demos, tutorials and test files will be copied into /usr/local/bin

  1. 源码编译 realsense-ros

创建工作空间
mkdir -p ~/catkin_ws/src && cd ~/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
sudo apt-get install ros-kinetic-ddynamic_reconfigure
编译
cd ~/catkin_ws
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
启动相机节点
roslaunch realsense2_camera rs_camera.launch

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值