Code Monkey home page Code Monkey logo

kitti-lego-loam's Introduction

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 (tested with indigo and kinetic)
  • gtsam (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

  1. 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

  1. 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.

  1. Play existing bag files:
rosbag play *.bag --clock 

Evaluation with evo kit

Check and follow this repository

https://github.com/MichaelGrupp/evo

Evaluation results

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;
  1. 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. 
  1. 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 : RobustFieldAutonomyLab/LeGO-LOAM#12

kitti-lego-loam's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.