当前位置:网站首页>Installation and operation of orb-slam2 under ROS
Installation and operation of orb-slam2 under ROS
2022-07-26 03:08:00 【hong_ cy&】
This blog has sorted out ROS install ,ORB-slam2 install ,ROS Of ORB-slam2 install
1.ROS install
http://www.autolabor.com.cn/book/ROSTutorials/chapter1/12-roskai-fa-gong-ju-an-zhuang.htmlWhen installing ,sudo rosdep init and rosdep update Failure , You will encounter connection problems , Use the method provided by the following connection to install
https://blog.csdn.net/qq_35813104/article/details/117332670thus ,ROS installation is complete , have access to roscore verification .
2.ORB-SLAM2 install
2.1 Installation tools
sudo apt-get install cmake
sudo apt-get install git
sudo apt-get install gcc g++ 2.2 install Pangolin
Pangolin It's right OpenGL Lightweight to encapsulate OpenGL Input / Output and video display library . It can be used for 3D Visual and 3D Visual map of navigation , You can input all kinds of videos 、 And you can keep video and input data for debug.
Installation dependency
sudo apt-get install libglew-dev
sudo apt-get install libboost-dev libboost-thread-dev libboost-filesystem-dev
sudo apt-get install libpython2.7-devinstall Pangolin
Pangolin Download link :
https://github.com/stevenlovegrove/Pangolin
The recommended version is V0.5, This can be avoided Eigen3 Report errors .

2.3 install Eigeb
sudo apt-get install libeigen3-dev2.4 install opencv
opencv Official download address :Releases - OpenCV
Choose the version 3.4.0, Download and unzip
cd opencv3.4.0
mkdir build
cd build
cmake ..
make -j2
sudo make install2.5 install ORB-SLAM2
git clone https://github.com/raulmur/ORB_SLAM2.git ORB_SLAM2
cd ORB_SLAM2
chmod +x build.sh
./build.shAn error will be reported here

resolvent :
In all the wrong documents , Add header file :
#include <unistd.h>There are many documents , You need to be patient and continue to report errors before adding .
Come here ORB-SLAM2 Just install it .
2.6 ROS Of ORB-SLAM2 install
2.6.1 Add environment variables
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/ORB_SLAM2/Examples/ROS2.6.2 compile ROS file
chmod +x build_ros.sh
./build_ros.sh./build_ros.sh There will be many errors as follows :
Refer to this blog to solve
2.6.3 Run camera
compile USB( Download address :GitHub - ros-drivers/usb_cam: A ROS Driver for V4L USB Cameras)
Pay attention to revision src/usb_cam-develop/launch In the document launch, It needs to be modified to its own equipment number .
mkdir -p ./usb_cam_ws/src
catkin_init_workspace
// hold usb_cam Put it in usb_cam_ws/src Next
cd usb_cam_ws/
catkin_make
source devel/setup.bashOpen a new terminal , function
roscore
// A new terminal
roslaunch usb_cam usb_cam-test.launch
3 function ORB-SLAM2
3.1 Download datasets
Tum Data sets :Computer Vision Group - Dataset Download
Download and unzip , Finally put it in ORB-SLAM2 Under the path . It is recommended to use fr1/xyz Data sets

3.2 function
./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt Examples/Monocular/TUM1.yaml /home/hong/ORB_SLAM2/data/rgbd_dataset_freiburg1_xyz3.3 Use ROS function ORB-SLAM2
Reference resources 2.6.3, Run camera
function rostopic list view message

gedit /home/hong/Desktop/ORB_SLAM2-master/ORB_SLAM2-master/Examples/ROS/ORB_SLAM2/src/ros_mono.ccChange the subscribed topic to camera topic

function ORB-SLAM2( If there are no tracks and keyframes , You need to adjust your camera resolution or camera internal parameters , It may be that there is a big difference between the default values of your internal participation , It makes it impossible to solve )
// A new terminal
source ~/.bashec
rosrun ORB_SLAM2 Mono /home/hong/Desktop/ORB_SLAM2-master/ORB_SLAM2-master/Vocabulary/ORBvoc.txt /home/hong/Desktop/ORB_SLAM2-master/ORB_SLAM2-master/Examples/Monocular/TUM1.yaml

边栏推荐
- 移位距离和假设的应用
- Jsd-2204-cool shark Mall (Management Commodity module) -day02
- 图像识别(六)| 激活函数
- Convert rich text to normal text
- C language layered understanding (C language function)
- 【C语言】深入理解 整型提升 和 算术转换
- Win11更改磁盘驱动器号的方法
- Anti electronic ink screen st7302
- MySQL tutorial: MySQL database learning classic (from getting started to mastering)
- Win11隐藏输入法状态栏方法
猜你喜欢

How to design test cases according to the requirements of login testing?
![[SQL] 自连接的用法](/img/92/92474343b4b4e6ea60453b4799cb55.jpg)
[SQL] 自连接的用法

canvas——绘制文本——饼图的修改

Influence of middle tap change on ZVS oscillation circuit

Jenkins' study notes are detailed

循环与分支(一)

Be highly vigilant! Weaponization of smartphone location data on the battlefield

OxyCon 2022 网络抓取前沿大会即将开启!
![[translation] cloud like internal load balancer for kubernetes?](/img/e5/f003ebed05a94d2936cfef5617f745.jpg)
[translation] cloud like internal load balancer for kubernetes?

Study notes of pytorch deep learning practice: convolutional neural network (Advanced)
随机推荐
MySQL教程:MySQL数据库学习宝典(从入门到精通)
Execution process behind shell commands
Summary of Huawei virtualization fusioncompute knowledge points
Win11隐藏输入法状态栏方法
Jsd-2204-cool shark Mall (Management Commodity module) -day02
Opencv 在图像上进行标注(画框+写字)
QT signal transmission between multi-level objects signal transmission between multi-level nested class objects
STM - exti external interrupt learning notes
The difference between the world wide web, the Internet and the Internet
图像识别(七)| 池化层是什么?有什么作用?
Win11大小写提示图标怎么关闭?Win11大小写提示图标的关闭方法
[SQL] 自连接的用法
VR panoramic shooting and production of business center helps businesses effectively attract people
Be highly vigilant! Weaponization of smartphone location data on the battlefield
【C进阶】深入探索数据的存储(深度剖析+典例解读)
Standardize your own debug process
[sql] usage of self connection
Influence of middle tap change on ZVS oscillation circuit
Keyboardtraffic, a tool developed by myself to solve CTF USB keyboard traffic
Programming example of STM32 state machine -- fully automatic washing machine (Part 1)