ros——realsense sdk编译与安装
一、RealSense SDK 2.0 (v2.48.0)源码编译安装
SDK源码的下载地址 https://github.com/IntelRealSense/librealsense/releases
本文下载的是2.4.8:
https://github.com/IntelRealSense/librealsense/releases/tag/v2.48.0
下载对应的版本 source code
编译安装方法参考:
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md
使用一般步骤:
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=true …
make
sudo make install
二、ROS源码运行
ros源码下载地址
https://github.com/intel-ros/realsense/releases
https://github.com/IntelRealSense/realsense-ros
一定要仔细查看每一个版本基于的sdk的版本号,realsense-ros的版本号与librealsense的版本号相对应。
本文安装的版本:
https://github.com/IntelRealSense/realsense-ros/releases/tag/2.3.1
参考:
https://blog.csdn.net/u012926144/article/details/80761342
运行:
roslaunch realsense2_camera rs_camera.launch
提示以下问题:
问题一:
INFO] [1634287981.949484001]: Initializing nodelet with 24 worker threads.
[ERROR] [1634287982.047396499]: Failed to find nodelet with name '/camera/realsense2_camera' to unload.
gedit ~/.bashrc看了一下,发现我source的路径不对,具体步骤为:
1. gedit ~/.bashrc
2. 添加 source /home/xxx/realsense工作空间名/devel/setup.bash
3. source ~/.bashrc
4. roslaunch realsense2_camera rs_camera.launch
之后这个问题解决
参考:https://blog.csdn.net/alien_y/article/details/115873129
问题二:
***************************************************
** running with a different librealsense version **
** than the one the wrapper was compiled with! **
***************************************************
解决方法:
Did you install the wrapper with packages using Method 1 of the wrapper's installation instructions?
https://github.com/IntelRealSense/realsense-ros#method-1-the-ros-distribution
With this method, librealsense and the ROS wrapper are both installed at the same time. But the librealsense version in these packages may not be the latest one.
So if you installed SDK 2.39.0 first with packages and then used wrapper installation Method 1, I could foresee how SDK 2.38.1 could get installed with the wrapper and you could end up with two SDK versions on your computer.
使用命令:
sudo apt-get install ros-$ROS_DISTRO-realsense2-camera
同时安装了 librealsense 和 ROS wrapper ,因此出现该问题。
需要重新安装ROS wrapper.
参考:
https://github.com/IntelRealSense/realsense-ros/issues/1497
更多推荐


所有评论(0)