当前位置:网站首页>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的,当然底层代码相关的才是最需要去深挖的,明天看代码,希望后面自己总结一些与代码相关的问题。
边栏推荐
- C 转义字符
- [wechat applet] 5 Applet structure directory
- C 数据类型
- [gatewaysessioninactiveevent event] 1 Connect your own client disconnect
- JD scanning code to obtain cookies
- Alibaba, Tencent and pinduoduo set an example, and the new logic of industrial Internet is gradually emerging
- Alibaba, Tencent et pingduo sont à la recherche d'une nouvelle logique pour l'Internet industriel
- 程序构造和解释之第一章习题
- [system. Currenttimemillis()] current timestamp: the number of milliseconds that have elapsed since the current system time was 0:00:00 on January 1, 1970
- MH32F103ARPT6软硬件兼容替代STM32F103RCT6
猜你喜欢

C main function

【LDA】LDA主题模型笔记—主要是狄利克雷

Tu oses le croire? Il m'a fallu deux jours pour développer un système de gestion.

Element positioning of selenium

Unit test (I) unit test with JUnit

Energy chain smart electronics landed on NASDAQ: Bain is the shareholder to become the first share of charging services in China
![JS (I) error [err\u module\u not\u found]: cannot find package 'UUID' imported](/img/a4/ef2d73576e027a2179ec9251167fa4.jpg)
JS (I) error [err\u module\u not\u found]: cannot find package 'UUID' imported

Serialization and deserialization mechanism in terms of games

C main函数
![[Writeup]BUU SQL COURSE1[入门级]](/img/eb/1b2541b04ca231cb07f1f3706f51c7.png)
[Writeup]BUU SQL COURSE1[入门级]
随机推荐
基于TensorRT的深度学习模型部署实战教程!
C scanf function
selenium-webdriver之断言
Junit多线程的写法
Autofac Beginner (1)
C operator
[SPARK][CORE] 面试问题之什么是 external shuffle service?
指针相关概念
Leader education was forced to be delisted: Softbank CMC suffered heavy losses only one year after listing
NetCore结合CAP事件总线实现分布式事务——消息(2)
Simple code implementation of addition, subtraction, multiplication and division calculator
MH32F103ARPT6软硬件兼容替代STM32F103RCT6
Energy chain smart electronics landed on NASDAQ: Bain is the shareholder to become the first share of charging services in China
[writeup]buu SQL course1[entry level]
模块八
如何给域名前加上 www
函数相关事项
浏览器指纹解读
Getting started with webdriver
webdriver入门