Georeferencing

Georeferencing trajectories and metric maps is implemented in the mola_sm_loop_closure package.

The concept of using simple-maps as intermediary map format together with the layered metric map format (see [BC24]) enables embedding georeferenced coordinates to any kind of map typically used in robotics: grid maps, voxel maps, point clouds, etc.

https://mrpt.github.io/imgs/kaist01_georef_sample.png


1. How to build a georeferenced map

First, build a simple-map from a dataset or a live robot as described in Tutorial: build a map. Make sure of having a GPS (GNSS) sensor source emitting observations, and that they were captured by MOLA-LO (see the corresponding variable in the LO pipeline).

Then, build the corresponding metric map by applying a metric map generation pipeline (see [BC24] or this step in the tutorial:

# Build metric map (mm) from simplemap (sm):
sm2mm -i datasetWithGPS.simplemap -o myMap.mm -p sm2mm_pipeline.yaml

Now, to find out the optimized map-to-ENU transformation and write it into the map file, use:

# georeference it:
mola-sm-georeferencing -i datasetWithGPS.simplemap --write-into myMap.mm
Full CLI reference
USAGE:

   mola-sm-georeferencing  [-v <INFO>] [-l <foobar.so>] [--write-into
                              <map.mm>] -i <map.simplemap> [--]
                              [--version] [-h]


Where:

   -v <INFO>,  --verbosity <INFO>
   Verbosity level: ERROR|WARN|INFO|DEBUG (Default: INFO)

   -l <foobar.so>,  --load-plugins <foobar.so>
   One or more (comma separated) *.so files to load as plugins, e.g.
   defining new CMetricMap classes

   --write-into <map.mm>
   An existing .mm file in which to write the georeferencing metadata

   -i <map.simplemap>,  --input <map.simplemap>
   (required)  Input .simplemap file

   --,  --ignore_rest
   Ignores the rest of the labeled arguments following this flag.

   --version
   Displays version information and exits.

   -h,  --help
   Displays usage information and exits.

2. Georeferenced trajectories

Once you already have a trajectory file in the local map frame of reference, for example, as generated by MOLA-LO in TUM format, and after georeferencing the generated map as shown above, you can use the CLI tool mola-trajectory-georef to convert it into geodetic coordinates, for example in KML format suitable for visualization in Google Earth.

Full CLI reference
USAGE:

   mola-trajectory-georef  -o <path.kml> -t <traj.tum> -m <map.mm> [--]
                              [--version] [-h]

Where:

   -o <path.kml>,  --output <path.kml>
   (required)  The name of the google earth kml file to write to

   -t <traj.tum>,  --trajectory <traj.tum>
   (required)  Input .tum trajectory, in map local coordinates

   -m <map.mm>,  --map <map.mm>
   (required)  Input .mm map with georef info

   --,  --ignore_rest
   Ignores the rest of the labeled arguments following this flag.

   --version
   Displays version information and exits.

   -h,  --help
   Displays usage information and exits.

3. Georeferenced maps in mm-viewer

Write me!