# LeGO-LOAM for kitti dataset
This repository contains the modified code of LeGO-LOAM to run and evaluate with the kitti-data set. When you run the code, you'll get the trajectory results of LeGO-LOAM in KITTI ground-truth format and you can directly evaluate the result with KITTI ground-truth by EVO-eval kit. Wish you find it helpful, especially for those who are not familiar with ROS and LOAM.
## Dependency
- [ROS](http://wiki.ros.org/ROS/Installation) (tested with indigo and kinetic)
- [gtsam](https://github.com/borglab/gtsam/releases) (Georgia Tech Smoothing and Mapping library, 4.0.0-alpha2)
```
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
```
## Compile
1. You can use the following commands to download and compile the package.
```
cd ~/catkin_ws/src
git clone https://github.com/Mitchell-Lee-93/kitti-lego-loam.git
cd ..
rosdep install --from-paths src --ignore-src -r -y
catkin_make
```
## Making new bagfile from kitti dataset
Download odometry dataset(color or gray, velodyne, calibration, ground truth)
from : http://www.cvlibs.net/datasets/kitti/eval_odometry.php and Merge them all in one dataset directory
1. Edit the launch file
```
gedit ~/catkin_ws/src/kittibag/launch/kittibag.launch
```
Change 'dataset_folder' and 'output_bag_file' to your own directories
2. Run the launch file:
```
roslaunch kittibag kittibag.launch
```
## Run the package
1. Before run, you should change the directory of the result files
```
gedit ~/catkin_ws/src/LeGO-LOAM/LeGO-LOAM/launch/run.launch
```
change 'RESULT_PATH' to your result dir
2. Run the launch file:
```
roslaunch lego_loam run.launch
```
Notes: The parameter "/use_sim_time" is set to "true" for simulation, "false" to real robot usage.
3. Play existing bag files:
```
rosbag play *.bag --clock
```
## Evaluation with evo kit
Check and follow this repository
https://github.com/MichaelGrupp/evo
## Evaluation results
<img src = "https://raw.githubusercontent.com/Mitchell-Lee-93/kitti-lego-loam/master/kittibag/pic/1.png" width = "300"> <img src = "https://raw.githubusercontent.com/Mitchell-Lee-93/kitti-lego-loam/master/kittibag/pic/2.png" width = "300"> <img src = "https://raw.githubusercontent.com/Mitchell-Lee-93/kitti-lego-loam/master/kittibag/pic/3.png" width = "200">
## For A-LOAM with kitti
check https://github.com/Mitchell-Lee-93/kitti-A-LOAM
## Original code from
https://github.com/RobustFieldAutonomyLab/LeGO-LOAM
Modified code
1. utility.h
for Velodyne 64 channel
```
extern const string pointCloudTopic = "/kitti/velo/pointcloud"; <- you should check your own bag file topic
//param for vel-64
extern const int N_SCAN = 64;
extern const int Horizon_SCAN = 1800;
extern const float ang_res_x = 0.2;
extern const float ang_res_y = 0.427;
extern const float ang_bottom = 24.9;
extern const int groundScanInd = 50;
```
2. featureAssociation.cpp
Since kitti data already have removed the distortion
```
float s 10 * (pi->intensity - int(pi->intensity)); -> float s = 1;
// to delete all the code that corrects point cloud distortion
TransformToEnd(&cornerPointsLessSharp->points[i], &cornerPointsLessSharp->points[i]); -> removed
TransformToEnd(&surfPointsLessFlat->points[i], &surfPointsLessFlat->points[i]); -> removed
*Notes: The parameter "loopClosureEnableFlag" is set to "true" for SLAM.
```
3. transformfusion.cpp
To correct two diffrent TF of lego-loam results and kitti gt. And also to save the results in kitti gt format
```
From line 222 to 286, saving results code added
```
Reference : https://github.com/RobustFieldAutonomyLab/LeGO-LOAM/issues/12
![avatar](https://profile-avatar.csdnimg.cn/3e6d521ce52f4ac7a1f9fe83f74f015d_weixin_42101237.jpg!1)
RonaldWang
- 粉丝: 29
- 资源: 4585
最新资源
- springboot015基于SpringBoot的在线视频教育平台的设计与实现_zip.zip
- 基于CNN-LSTM与注意力机制的数据分类预测神器:简单替换Excel,轻松提高预测精度,CNN-LSTM-Attention结合Matlab实现的多特征输入数据分类预测模型:注释清晰,适合新手,附赠
- springboot016房产销售系统_zip.zip
- 1978-2023年各省农业机械总动力数据(无缺失).xls
- C#高级编程:从零基础入门到高级语法全集
- springboot023学生宿舍管理系统的设计与开发_zip.zip
- springboot027网上点餐系统_zip.zip
- springboot033小徐影城管理系统_zip.zip
- springboot041师生健康信息管理系统_zip.zip
- springboot042IT技术交流和分享平台的设计与实现_zip.zip
- Simpack CRH2型高铁车辆模型全轨道谱激励版,Simpack CRH2型高铁车辆模型:全轨道谱激励下的精准模拟分析,simpack CRH2型高铁车辆模型,带全部轨道谱激励 ,simpac
- Eigen库,C++数学库
- springboot037基于SpringBoot的墙绘产品展示交易平台的设计与实现_zip.zip
- springboot050星之语明星周边产品销售网站的设计与实现_zip.zip
- springboot047大学生就业招聘系统的设计与实现_zip.zip
- 基于COMSOL的水力压裂岩石损伤耦合模型与MATLAB裂缝制作代码研究,COMSOL水力压裂岩石损伤耦合模型:含裂缝MATLAB代码与HM损伤模拟,comsol水力压裂岩石损伤耦合模型,含裂缝制作代
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)