使用kinect v1 RGBDSLAMv2

这篇博客详细介绍了如何在Ubuntu系统中将Kinect V1与RGBDSLAMv2集成,包括安装OpenNI Sensor、ROS的freenect包、rgbdslamv2和g2o。在编译过程中遇到了C++11标准支持、g2o依赖安装、bash解析问题以及OpenCV和PCL的源码安装问题,通过查阅和参考多个博客解决了这些问题,但最终仍未能成功启动RGBDSLAMv2。
摘要由CSDN通过智能技术生成

1、安装需要OpenNI Sensor:参考blog  https://blog.csdn.net/u013453604/article/details/48013959

2、安装ROS的freenect包:https://www.ncnynl.com/archives/201703/1438.html

连接kinect,启动rviz查看结果:

 

roslaunch freenect_launch freenect-registered-xyzrgb.launch

roslaunch freenect_launch freenect.launch

rosrun image_view image_view image:=/camera/rgb/image_color

3、安装rgbdslamv2,g2o,g2o有作者自己的版本,作者的安装说明:

1. Put RGBDSLAMv2 in a catkin workspace: See [the catkin tutorial](http://wiki.ros.org/catkin/Tutorials/create_a_workspace) 
  for details. Use git to clone this repository into your workspace's "src/" directory. Or download RGBDSLAMv2 as an [archive](http://codeload.github.com/felixendres/rgbdslam_v2/zip/kinetic) and extract it to "src/".
2. Download my [g2o fork|https://github.com/felixendres/g2o], put it in some other directory. 
   Build and install. Export the environment variable `$G2O_DIR` to the installation directory to
   let rgbdslam_v2 know where to find it (see Installation from Scratch for an example).
2. Use rosdep (i.e. "rosdep install rgbdslam") to install missing 
  dependencies. For details see http://wiki.ros.org/ROS/Tutorials/rosdep
4. To build RGBDSLAMv2 go to your catkin workspace and execute "catkin_make". 

   If you get an error about the missing siftgpu library, execute "catkin_make" again.

rgbdslamv2:  https://www.ncnynl.com/archives/201708/1931.html

在此之前,需安装g2o: https://blog.csdn.net/zhuquan945/article/details/52894528

error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
当使用CMAKE编译工程时,出现这个错误,解决办法: 

在工程主目录的CMakeLists.txt中添加如下,可以编译成功:

SET( CMAKE_CXX_FLAGS "-std=c++11 -O3")

安装g2o需安装依赖项sudo apt-get install cmake libeigen3-dev libsuitesparse-dev libqt4-dev qt4-qmake libqglviewer-dev

编译G2O还有错误,参考的blog:https://blog.csdn.net/u013004597/article/details/52496995

ubuntu系统shell 中source: not found错误 :https://blog.csdn.net/buynow123/article/details/51774018

错误: shell脚本中含有source命令运行时提示 source: not found
测试: 
运行 ls -l /bin/sh 后显示/bin/sh -> dash 
这说明是用dash来进行解析的。
解决方案: 
命令行执行:dpkg-reconfigure dash(需要root权限) 
在界面中选择no 
再运行ls -l /bin/sh 后显示/bin/sh -> bash
最后测试shell脚本,可以正常使用!



仍然无法启动。按照作者的installation脚本安装。

参考blog中的内容: http://www.cnblogs.com/gaoxiang12/p/4462518.html

从源码安装 OpenCV, PCL

http://blog.sciencenet.cn/blog-571755-694742.html

安装opencv2.4.1时,编译遇到问题:

make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.o] Error 1

make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2

make: *** [all] Error 2

解决办法:https://blog.csdn.net/fantasysolo/article/details/80365772
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值