当前位置:网站首页>Laser slam:logo-loam --- code compilation, installation and gazebo test
Laser slam:logo-loam --- code compilation, installation and gazebo test
2022-07-28 20:49:00 【The moon shines on the silver sea like a dragon】
laser slam:LeGO-LOAM--- Code compilation and installation gazebo test
LeGO-LOAM brief introduction
LeGO-LOAM Our English full name is lightweight and ground optimized lidar odometry and mapping. Lightweight lidar odometer with ground optimization and mapping 
The framework is as follows , In general, and LOAM It's consistent 
LeGO-LOAM Is based on LOAM Improved version , Its main purpose is to realize the positioning and mapping of the car under changeable terrain , A series of improvements have been made for both the front end and the back end .
In the original LOAM For example, the application scenario is :AGV Driving in the grass , Points in the grassland will probably be extracted as corners , But this kind of point is unstable , Compared with buildings 、 Stable corners such as trunk , I hope to remove the corners on the ground .
LeGO-LOAM More lightweight , Reduce the calculation load without affecting the accuracy , It ensures the real-time performance of the embedded platform
comparison LOAM Improvements
front end :
- 1 Classify and extract ground points , Avoid the extraction of some edge points
- 2 A simple point cloud clustering algorithm is applied , Eliminate some possible outlier
- 3 Solve the front-end odometer in two steps , Reduce the calculation load without affecting the accuracy , It ensures the real-time performance of the embedded platform
Back end :
- 1 Use slam The back-end part is reconstructed with the concept of key frame in
- 2 The concepts of loop detection and pose map optimization are introduced , Make the global consistency of the map better
LeGO-LOAM Code compilation installation
github The address is :https://github.com/RobustFieldAutonomyLab/LeGO-LOAM
Has been tested ROS Version has :
- indigo
- kinetic
- melodic
Its dependent libraries are gtsam. So you need to install it first gtsam
wget -O ~/Downloads/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.0-alpha2.zip
cd ~/Downloads/ && unzip gtsam.zip -d ~/Downloads/
cd ~/Downloads/gtsam-4.0.0-alpha2/
mkdir build && cd build
cmake ..
sudo make install
cmake It can be changed into the following instructions
cmake -DGTSAM_BUILD_EITH_MARCH_NATIVE=OFF -DGTSAM_USE_SYSTEM_EIGEN=ON ..
The purpose is to set some macros
DGTSAM_BUILD_EITH_MARCH_NATIVE Is open css Accelerated macros , To shut down . Avoid other libraries ( such as PCL Or your own code ) If it's not turned on , It will cause abnormal conditions during operation
DGTSAM_USE_SYSTEM_EIGEN This is installed with the system eigen Compiled macro , To turn on .OFF Yes, I can gtsam Self contained eigen, There are two versions of code running eigen It's easy to go wrong
Then download LeGO-LOAM Of ROS Function pack
git clone https://github.com/RobustFieldAutonomyLab/LeGO-LOAM.git
And then on ROS Working space for
Then compile , Be careful The first compilation should use
catkin_make -j1
You don't need to compile later -j1 了
The reason for this is LeGO-LOAM There are some customized msg.
-j1 Will be compiled by single thread . Put custom msg Compile to .
If you use it directly catkin_make According to how many cores the computer has , Compile several threads .
If the compilation is successful, it will generate LeGO-LOAM Of Executable file 
LeGO-LOAM Gazebo test
Here's a direct build gazebo Test scenarios Yes LeGO-LOAM Conduct a preliminary test
Before running, it needs to be based on The type of lidar used , stay utility.h Set some variables in the file
The location of the file is include Under the folder :
Point cloud of lidar Topic name
extern const string pointCloudTopic = "/velodyne_points";
The parameters of lidar include
- Wire harness
- Horizontal points
- Horizontal corner resolution
- Vertical angle resolution
- Angle with horizontal direction
- The number of laser lines scanned to the ground
stay gazebo The simulation scenario built in is used Velodyne-16 Laser radar of , Its configuration is as follows :
// VLP-16
extern const int N_SCAN = 16;
extern const int Horizon_SCAN = 1800;
extern const float ang_res_x = 0.2;
extern const float ang_res_y = 2.0;
extern const float ang_bottom = 15.0+0.1;
extern const int groundScanInd = 7;
And then run in launch Under folder run.launch file
Then start the simulation scenario , Do a preliminary test
The result is as follows :

stay rviz The medium green is the corner , The pink one is pastry
There is no abnormality in feature extraction 
Construction of drawings
边栏推荐
- Unity typewriter teaches you three ways
- GIS数据漫谈(六)— 投影坐标系统
- LVS deployment Dr cluster
- Unity uses shader to quickly make a circular mask
- JS chart scatter example
- 太空射击第09课:精灵动画
- Raspberry pie 4B deploy yolov5 Lite using ncnn
- Teach you unity scene switching progress bar production hand in hand
- C# 读取 CSV文件内数据,导入DataTable后显示
- 企业如何成功完成云迁移?
猜你喜欢

如何用Redis实现事物以及锁?

DHCP.DNS.NFS

Three steps to teach you unity serial communication

Ask if you don't understand, and quickly become an advanced player of container service!

Speech controlled robot based on ROS (I): realization of basic functions

LVS+KeepAlived高可用部署实战应用

超大模型工程化实践打磨,百度智能云发布云原生AI 2.0方案

Use of DDR3 (axi4) in Xilinx vivado (1) create an IP core

Cartoon JS shooting game source code

JS chart scatter example
随机推荐
C# 委托 delegate 的理解
NAT实验演示(Huawei交换机设备配置)
How to balance security and performance in SQL?
类与对象(中)
漂亮的蓝色背景表单输入框样式
User and group and authority management
Unity package exe to read and write excel table files
JS page black and white background switch JS special effect
Hangao database best practice configuration tool Hg_ BP log collection content
Teach you how to draw a map with ArcGIS [thermal map]
[task01: getting familiar with database and SQL]
Usage Summary of thymeleaf
激光slam:LeGO-LOAM---代码编译安装与gazebo测试
JS chart scatter example
太空射击第10课: Score (繪畫和文字)
MySQL batch update data
Clock distribution of jesd204 IP core (ultrascale Series)
Network shell
SQL审核工具自荐Owls
太空射击第14课: 玩家生命