当前位置:网站首页>Kinect2.0+ORBSLAM2_with_pointcloud_map
Kinect2.0+ORBSLAM2_with_pointcloud_map
2022-06-12 14:51:00 【春至冬去】
文章目录
一、kinect2.0驱动
1.libfreenect2
git clone https://github.com/OpenKinect/libfreenect2.git
cd libfreenect2
cd depends; ./download_debs_trusty.sh //下载upgrade deb 文件
sudo apt-get install build-essential cmake pkg-config//安装编译工具
sudo dpkg -i debs/libusb*deb //安装libsub
sudo apt-get install libturbojpeg libjpeg-turbo8-dev//安装TurboJPEG
sudo dpkg -i debs/libglfw3*deb//安装OpenGL
sudo apt-get install -f
sudo apt-get install libgl1-mesa-dri-lts-vivid
//Build
cd ..
mkdir build && cd build
cmake ..
make
make install
设定udev rules: sudo cp …/platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/, 然后重新插拔Kinect2
现在可以尝试运行Demo程序:./bin/Protonect
应该可以看到kinect相机的画面
2.iai-kinect2
从Github上面下载工程源码到工作空间内src文件夹内
cd ~/catkin_ws/src/
git clone https://github.com/code-iai/iai_kinect2.git
cd iai_kinect2
rosdep install -r --from-paths .
cd ~/catkin_ws
catkin_make -DCMAKE_BUILD_TYPE="Release"
注意
针对于上述命令中最后一行指令, 需要说明的是, 如果前面libfreenect2你安装的位置不是标准的两个路径下, 需要提供参数指定libfreenect2所在路径:
catkin_make -Dfreenect2_DIR=path_to_freenect2/lib/cmake/freenect2 -DCMAKE_BUILD_TYPE="Release"
编译结束,可以在ROS中获取Kinect2的数据,如果遇到命令不能执行的情况,应该将对应的环境写入~/.bashrc文件。
roslaunch kinect2_bridge kinect2_bridge.launch
roslaunch发起相关的节点,另一个终端输入rostopic list 可以查看相关的Topic,还可以输入 rosrun kinect2_viewer kinect2_viewer sd cloud ,开启Viewer查看数据
二、ORBSLAM2_with_pointcloud_map
1.安装Pangolin
依赖项:
sudo apt-get install libglew-dev
sudo apt-get install ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libavdevice-dev
sudo apt-get install libdc1394-22-dev libraw1394-dev
sudo apt-get install libjpeg-dev libpng12-dev libtiff5-dev libopenexr-dev
源码编译安装
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake ..
cmake --build .
sudo make install
2.ORBSLAM2_with_pointcloud_map
git clone https://github.com/gaoxiang12/ORBSLAM2_with_pointcloud_map.git
解压orbslam2_modified.zip,会得到两个文件夹,分别为g2o_with_orbslam2和ORB_SLAM2_modified
编译g2o
安装依赖项
sudo apt-get intall libsuitesparse-dev qtdeclarative5-dev qt5-default libqglviewer-dev
后期修改参照博客:
https://blog.csdn.net/qq_25349629/article/details/88350374
运行rgbd_tum,基于数据集查看建图情况:
我运行的指令如下图所示
点云情况如下:
3.用自己的Kinect实时建图
参考博客:
https://blog.csdn.net/qq_25349629/article/details/88528765
按照博主的编译通过了,但是最后遇到了一点问题
ERROR While loading shared libraries:cannot open shared object file
确实有点儿菜…
因为不能用自己的kinect实时跑,所以打算做自己的一个数据集,用数据集来建图看一下,然后就有了后面几张图片:


用自己的数据集跑了一下,感觉效果并不怎么好,可能与录制的数据集有关,点云很稀疏。
实时再次证明:你还是很菜…
总结
问题总是会遇到的,当然还是要想法设法去解决,各种SLAM相关的包其实跑了也挺多,今天临时兴起简单总结一点相关ORB的,当然底层代码相关的才是最需要去深挖的,明天看代码,希望后面自己总结一些与代码相关的问题。
边栏推荐
- JUnit exception, a method that asserts that the exception information is not empty
- Tensorrt based in-depth learning model deployment practice tutorial!
- Getting started with webdriver
- Location (I) error: command erred out with exit status
- 指针相关概念
- webdriver入门
- NetCore结合CAP事件总线实现分布式事务——入门(1)
- Can you believe it? It took me only two days to develop a management system
- 野指针理解
- selenium进阶
猜你喜欢

Data collection

Unit test (I) unit test with JUnit

Installation and use of mat

selenium之元素定位

NETCORE combined with cap event bus to realize distributed transaction -- Introduction (1)

JUnit test suite method sorting (method 2 is not easy to use)

Jetpack architecture component learning (3) -- activity results API usage

Jetpack架构组件学习(3)——Activity Results API使用

ROS中tf学习笔记

Appnium (I) basic use of appnium
随机推荐
Alibaba, Tencent et pingduo sont à la recherche d'une nouvelle logique pour l'Internet industriel
三维重建系统 | L3增量运动恢复结构(增量SFM)
Structure example
Detailed explanation of factory pattern (simple factory pattern, factory method pattern, abstract factory pattern) Scala code demonstration
junit测试套件方法整理(方法二不太好用)
Element positioning of selenium
Junit测试中常用的断言
[spark][core] what is an external shuffle service?
亿纬锂能拟募资90亿:刘金成骆锦红夫妇合计认购60亿 布局光谷
MAT的安装和使用
函数相关事项
Energy chain smart electronics landed on NASDAQ: Bain is the shareholder to become the first share of charging services in China
能链智电登陆纳斯达克:贝恩是股东 成中国充电服务第一股
Getting started with webdriver
And, or, not equal, operator
[gatewaysessioninactiveevent event] 1 Connect your own client disconnect
[SPARK][CORE] 面试问题之什么是 external shuffle service?
JUnit test suite method sorting (method 2 is not easy to use)
Thinking: what is asynchrony and thread safety
[spark][core] interview questions talk about push based shuffle