/FlexCloud

Georeferencing of Point Cloud Maps

Primary LanguageC++GNU General Public License v3.0GPL-3.0

FlexCloud

Georeferencing of Point Cloud Maps

Linux Docker

Overview

This project enables the georeferencing of an existing point cloud map created only from inertial sensor data (e.g. LiDAR) by the use of the corresponding GNSS data. Leveraging the concept of rubber-sheeting from cartography, the tool is also able to account for accumulated errors during map creation and thus rectyfy the map.

image

🐋 Installation

  1. Clone the repository by running
git clone git@github.com:TUMFTM/FlexCloud.git
  1. Go to the root directory of the repository
cd FlexCloud/
  1. Build the docker image
./docker/build_docker.sh  

You can also download built versions of the docker images from the github container registry. E.g. to download the latest container, run:

docker pull ghcr.io/tumftm/flexcloud:latest
  1. Run the container and mount your data by appending the directory containing your data:
./docker/run_docker.sh /your/local/directory/data

Note that you have to change the image name within the script, if you downloaded the docker image from Dockerhub in the previous step. Although installation with the provided Docker-Container is recommended, you can also install the package locally. To do so, you first have to install the required dependencies:

  • PCL
  • CGAL
  • GeographicLib
  • Eigen3
    If you are struggling with their installation, you can have a look at the process within the Dockerfile.

🔨 Usage

  • set parameters in /config/pcd_georef.yaml
  1. Necessary input parameters:

    • config_path => path to config-file
    • traj_path => path to GNSS/reference trajectory of the vehicle (format: txt-file with lat, lon, ele, lat_stddev, lon_stddev, ele_stddev or x, y, z, x_stddev, y_stddev, z_stddev, if the reference trajectory is already in local coordinates)
    • poses_path => path to SLAM trajectory of the vehicle (KITTI-format)
    • pcd_path => path to point cloud map corresponding to poses trajectory (OPTIONAL - only if transform_pcd set)
    • pcd_out_path => path to save the final, georeferenced point cloud map (OPTIONAL - only if transform_pcd set - DEFAULT: /pcd_map_georef.pcd)
  2. Start the package

    Usage: ./build/pcd_georef <config_path> <reference_path> <slam_path> <(optional) pcd_path> <(optional) pcd_out_path>

    To use the provided test data (only trajectories, no application on point cloud map -> set parameter transform_pcd to false)

    cd flexcloud/
    ./build/pcd_georef src/flexcloud/config/pcd_georef.yaml src/flexcloud/test/poseData.txt src/flexcloud/test/poses_map.txt 
  3. Inspect results

    • results of the rubber-sheet transformation & the resulting, transformed point cloud map are visualized in Rerun.
    • by default, the rerun viewer instance of the docker container is spawned. However, if you have problems with the viewer and your graphics drivers, you can also launch your viewer locally
    • adjust the parameters if the results are satisfying
    • see table for explanation of single topics
    • follow the instructions below (Content->Analysis) to get a quantitative evaluation fo the georeferencing
    • the results are automatically saved in the current working directory within the folder output/traj_matching/
    • Quick usage (the directory output/traj_matching is automatically generated at the current working directory):
        python3 plot_traj_matching.py /path/to/output/traj_matching/
Type Description
Trajectory reference trajectory
Trajectory_SLAM original SLAM trajectory
Trajectory_align SLAM trajectory aligned to reference with Umeyama transformation
Trajectory_RS SLAM trajectory after rubber-sheet-transformation
control_points control points used for rubber-sheeting
tetrahedra triangulation used for rubber-sheeting
pcd_map transformed point cloud map
  • Inspect results and modify parameters if desired.

📄 Content

Detailed documentation of the modules can be found below.

Trajectory Matching

  • calculation of transformation based on GNSS/reference and SLAM trajectories
  • trajectories do not have to be time-synchronized, although time-synchronization is required to select control points automatically for rubber-sheeting

1. Projection of Global Coordinates

  • global coordinates may be projected into local coordinate system using ENU-coordinates from the GeographicLib
  • origin of grid for projection set based on config file otherwise first GNSS point
  • if the reference trajectory is already in a local, metric coordinate system, the projection may be skipped using the parameter transform_traj

2. Alignment of Trajectories by Rigid Transformation

  • SLAM trajectory aligned to reference using Umeyama algorithm transformation in 2D/3D
  • application of calculated transformation on SLAM trajectory
  • screenshot below shows results of alignment of SLAM trajectory to projected reference trajectory with Umeyama algorithm
    image

3. Rubber-Sheet transformation

  • piecewise linear rubber-sheet transformation in 2D/3D based on concept of Griffin & White
  • using Delaunay triangulation from CGAL
  • manual selection of control points in RVIZ (see above) possible if trajectories are not time-synchronized (parameter auto_cp)
  • automatic exclusion of trajectory points as control points using thresholding for standard deviation possible
  • manual exclusion of indices as controlpoints and manual displacement in xy possible, see parameter descriptions
  • application of calculated transformations on target SLAM-poses and point cloud map
  • the two screenshots below show selected control points on the aligned trajectories from step 2 and the results of the rubber-sheet transformation
    image image

Evaluation

  • export of various data by setting corresponding parameters in config-file
    • data is exported to .txt files that are then read by python-scripts
    • set export path in config-file
    • adjust import paths at the beginning of python-scripts if necessary
  • analysis scripts in /analysis:
    • visualization of initial trajectories, Umeyama transformation and Rubber-Sheet transformation
    • execute script plot_traj_matching.py in /analysis
    • produces graphs shown in previous section
    • calculation of deviation between trajectories based on euclidean distance of points

📈 Test Data

The data was recorded by the TUM Autonomous Motorsport Team during the Abu Dhabi Autonomous Racing League 2024. The SLAM trajectory is created using KISS-ICP in combination with Interactive SLAM. The reference trajectory presents post-processed data from the RTK-corrected GNSS-signal of the vehicle.

📇 Developers

  • Maximilian Leitenstern, Institute of Automotive Technology, School of Engineering and Design, Technical University of Munich, 85748 Garching, Germany
  • Marko Alten (student research project)
  • Christian Bolea-Schaser (student research project)

📃 Citation

If you use this repository for any academic work, please consider citing our paper (preprint):

@misc{leitenstern2025flexcloud,
      title={FlexCloud: Direct, Modular Georeferencing and Drift-Correction of Point Cloud Maps}, 
      author={Maximilian Leitenstern and Marko Alten and Christian Bolea-Schaser and Dominik Kulmer and Marcel Weinmann and Markus Lienkamp},
      year={2025},
      eprint={2502.00395},
      archivePrefix={arXiv},
      primaryClass={cs.RO},
      url={https://arxiv.org/abs/2502.00395}, 
}