GithubHelp home page GithubHelp logo

mitchell-lee-93 / kitti-lego-loam Goto Github PK

View Code? Open in Web Editor NEW
132.0 5.0 24.0 27.01 MB

Easy description to run and evaluate Lego-LOAM with KITTI-data

License: BSD 3-Clause "New" or "Revised" License

CMake 1.39% C++ 97.45% C 1.16%
kitti lego-loam lidar-point-cloud lidar-odometry loam velodyne kitti-dataset kitti-data evo ground-truth

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

Contributors

mitchell-lee-93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kitti-lego-loam's Issues

Can not make bagfile from kitti

I'm getting error
ERROR: cannot launch node of type [aloam_velodyne/kittiHelper]: aloam_velodyne
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/sergey/catkin_ws/src
ROS path [2]=/opt/ros/melodic/share

rospack find kittibag
finding package at /home/sergey/catkin_ws/src/kittibag

kittibag launh:

<node name="kittiHelper" pkg="aloam_velodyne" type="kittiHelper" output="screen"> 
    <param name="dataset_folder" type="string" value="/home/sergey/Downloads/dataset_vl/" />
    <param name="sequence_number" type="string" value="10" />
    <param name="to_bag" type="bool" value="true" />
    <param name="output_bag_file" type="string" value="/home/sergey/aux_workspace/output_lego/10.bag" /> <!-- replace with your output folder -->
    <param name="publish_delay" type="int" value="1" />
</node>

Logfile:
roslaunch-sergey-PC-9863.log

I've installed ROS melodic, ubuntu 18
Thanks

result of kitti sequence 00 and 10 is worse than A-LOAM

I run your code in kitti sequence 00 and 10, I found the result was worse than A-LOAM
how about your result?

Screenshot from 2020-04-26 09-49-26
Screenshot from 2020-04-26 09-50-56
the white trajectory is groundtruth, and the worse trajectory is produced by lego-loam, the better trajectory is produced by A-LOAM

good work

I have some questions;
first ,do you delete the IMU information?
second,last week I use the repo test the kitti raw data(=sequence00+IMU),but unfortunately,the result is not good ,have you tested the 00 sequence ever?
图片

tools problem

when use the tool which you listed to transform the data to bag,the problem happened
图片

expect kitti-lio-sam

I think your work is very meaningful. Thank you for your work. Loop foword to kitti-lio-sam.

Error in rviz

hi,when I run the rviz,there was a warning:
Failed to find match for field 'intensity'.
How to solve it?thanks

Question about saving the results in kitti gt format

Hello, your work is great. I have a question after reading the code, I want to consult.Line 264,What does H_init means?Does it mean converting the point cloud to frame 1 instead of frame 0?And I removed it,the result is like the same as before.

License

Hello!

Thank you for a great job!

I would like to use your code.
What is the license for this code?

kittibag ERROR

Hi, when I try to run "roslaunch kittibag kittibag.launch", I got an error

"ERROR: cannot launch node of type [kittibag/kittibag]: Cannot locate node of type [kittibag] in package [kittibag]. Make sure file exists in package path and permission is set to executable (chmod +x)"

Can you help me to solve the error?

Create KITTI IMU rosbag

I successfully construct a map using Lidar scan. Now I am working on the IMU integration on Lidar and IMU to optimize the map. However, the IMU seems have no effect on the result. I saw in IMUhandle, you only use roll and pitch to optimize the angle. I wonder if there should be any coordinate frame change when we construct the Rosbag

saving map results

Hi,

first of all, thanks for sharing this project.

I only have the question if there is a command that enables to also save the created map as .pcd file?
Thanks in advance.

'std::bad_alloc' error

I've got an error. Here is the detail.

process[kittiHelper-1]: started with pid [16242]
Reading sequence 07 from /home/hyx/data/
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
[kittiHelper-1] process has died [pid 16242, exit code -6, cmd /home/hyx/catkin_ws/devel/lib/aloam_velodyne/kittiHelper __name:=kittiHelper __log:=/home/hyx/.ros/log/192ad190-92bd-11ea-b4a1-b025aa15cdd2/kittiHelper-1.log].
log file: /home/hyx/.ros/log/192ad190-92bd-11ea-b4a1-b025aa15cdd2/kittiHelper-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

I 've run the demo in Ubuntu 16.04.
Thanks a lot.

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.