35
L O C A L I Z I N G B A S E D O N A P R I O R M A P O V E R V I E W
After creating the reference map, determine If you need to run loop closure to reduce or
eliminate global drift. Once you have a suitable map, select Choose Map for Localization. The
fields will auto-populate with the links from the last run.
If you post-processed a map to use, browse and select it or any other map needed. If you choose
to use a .ply formatted map not created by Stencil 2, put it in a subfolder in the Recordings
directory on the desktop.
Select the appropriate localization mode (with or without Feature Tracker) and starting from the
initial position or final position when creating the reference map.
If starting a run from the ending location of a previous run, select the desired pose using the
Choose Last Pose
icon
.
This function is helpful if a mapping run failed or if you want to restart
from the ending pose of a previous map.
You can also create a Desired_Pose.txt file by editing the Last_pose.txt file with the desired
starting location, saving it, and selecting it when using the Choose Last Pose Icon.
The first two lines are comment lines and not necessary for the file. xyz are in meters. Yaw, pitch,
and roll are in radians. Normally, you can set pitch and roll to zero.
In addition to the map created during mapping and localization, there is an associated trajectory
file showing the location of lidar (mapping/localization without camera) or the middle of the front
camera lens (Mapping with Camera/Localization with Camera). It contains x, y, z, roll, pitch, yaw,
timestamp, and a confidence metric.
A typical trajectory file would look like the following:
ply
format ascii 1.0
element vertex 9284
property float x
property float y
property float z
property float scalar_roll
property float scalar_pitch
property float scalar_yaw
property double scalar_time
property float scalar_confidence_metric
end_header
-0.005566 -0.000917 0.069792 0.028200 -0.016447 -0.001450 0.000000 5.375860
-0.005800 0.000496 0.080750 0.025937 -0.017106 -0.001322 0.201720 6.201010
-0.011753 0.004490 0.090052 0.022906 -0.017853 -0.000562 0.403440 4.925473