Skip to content

Implementation of: 3D LiDAR Map Compression for Efficient Localization on Resource Constrained Vehicles

Notifications You must be signed in to change notification settings

HuanYin94/map_compression

Repository files navigation

3D LiDAR Map Compression for Efficient Localization on Resource Constrained Vehicles

Introduction

Code of a manuscript, published in IEEE Transactions on Intelligent Transportation Systems.

For the video demonstration, please refer to video.

If you use our code in an academic work, please cite the following paper:

@article{yin20203d,
  title={3D LiDAR Map Compression for Efficient Localization on Resource Constrained Vehicles},
  author={Yin, Huan and Wang, Yue and Tang, Li and Ding, Xiaqing and Huang, Shoudong and Xiong, Rong},
  journal={IEEE Transactions on Intelligent Transportation Systems},
  year={2020},
  publisher={IEEE}
}

System

Examples

After compression by RF, selected points are colored in red on the origin map
     

Prepare to build

This project is compiled on ros and Ubuntu. And use catkin_make in your workspace to build this project. Some dependencies are needed to be prepared:

Introduction to all folders

  • cfg
    contains configuration files: .rviz & filter.yaml, for visualization & configuration`

  • gurobi
    integer linear programming code, written in Matlab

  • launch
    roslaunch files to start-up ros nodes, C++

  • prepare
    sparcify the dense poses, generate keep.txt

  • random_forest
    train & test, learning part, copy from GitHub, thanks to ranger

  • src
    .cpp files using ros api & libpointmatcher

  • images
    some pictures of results long time ago

Files in each folder for map compression

prepare folder

  • prepare poses and scans
    Maltab files, get the sparser poses for robot stopping cases, distance threshold used for more uniform of poses
    input: origin poses or trajectories
    output: uniform poses or trajectories

gurobi folder

  • before
    previous try on programming, no use

  • q_ILP_lamda
    implementation for weighted ILP on map compression, including spliting and merging iteratively

random_forest folder

  • build
    training and testing in bash files

tools in src folder

  • formatTransfer
    change the cloud files in a folder (.vtk to .ply for example)
    input: the folder address
    output: new format in this folder

  • mapCheck
    check the map in Rviz
    __input:__map and poses (trajectory)

  • normalViewer
    show the generated surface normals
    __input:__the map and some params

map_generation in src folder

  • scanRegister
    use origin raw scans and popses to get the origin full map, filter raw scans to reduce large size
    input: uniform poses and origin scans
    output: dense origin full map

  • mapFilter
    filter the dense origin full map using Octree Grid, and generate surface normals
    input: dense origin full map
    output: origin full map

  • mapScoring
    score each laser point in map according to the strategy in paper, which is also for observation filter as a comparison input: origin full map, laser scans and poses
    output: scored origin full map

  • genWeightVector
    get the weight vector for integer linear programming
    input: scored origin full map
    output: all points' weight in a saved txt

  • genVisMatrix
    get the Visbility Matrix for integer linear programming
    input: origin full map, laser scans and poses (same as mapScoring)
    output: saved vis-files one by one in a folder

learn_program in src folder

  • mapCutterTraj
    split/Cut the whole Map into two parts: train or test, according to the nearest search on trajectory
    input: oringn full map, poses and cutPoition
    output: train map, test map and labeled full map

  • generateAllFeatures
    generate point feature for training or testing
    input: oringn full map, poses
    output: map with features in descriptors and features in a saved txt file

  • loadFinalResults
    annotate the origin full map with the final learned result
    input: origin full map and learned result in txt file
    output: labeled learned result in cloud file

  • loadProResult
    annotate the origin full map with the supervised result by programming
    input: origin file map and programmed results in files in a folder
    output: labeled programmed result in cloud file

  • mapCompresser
    generate compressed map according to the annotated map on descriptor
    input: annotated map by learning or programming, and the descriptor name
    output: compressed map

  • compareDistribution
    get the nearest distances between two compressed clouds
    input: two maps
    output: distances in a saved txt file

  • errorDistribution
    get the nearest distances between salient & salient_predicted in cloud (learning & programming)
    input:  one map with two descriptors (s & s_predicted)
    output: distances in a saved txt file

loc_test in src folder

  • locTest
    localization test by registration
    input:  point cloud map, laser scans, trajectory(for position initial)
    output: pose saved txt, time saved txt, icp iteration saved txt

comparisons in src folder

  • clusterMap
    achieve map compression by clustering point clouds
    input:  map, and some params
    output: saved clustered map

  • voxelMap
    achieve map compression by voxel grid (similar as octree grid)
    input:  map
    output: saved sparse map

  • randomSampleMap
    achieve map compression by random selection
    input:  map
    output: saved random map

  • selectByObserver
    achieve map compression by thresholding the observation count
    input:  map
    output: saved threshold map

  • splitCloudForSaliency
    split map to sub-maps for geometry saliency detection
    input:  map, and the trajectory
    output: sub-maps in a folder

  • saliencyMap
    genrate saliency map on point clouds
    input:  the folder contains sub-maps,
    output: saliency evaluation saved in txt files ina folder

  • mergeCloudForSaliency
    merge the saliency and sub-maps into a whole map
    input:  map, trajectory and saliency files
    output: one global map with saliency evaluation

License

MIT

About

Implementation of: 3D LiDAR Map Compression for Efficient Localization on Resource Constrained Vehicles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published