127
3) You will need to have a fix quality of 4 (preferred) or 5 (might work) when you start the
Localize using GNSS tool. If your GNSS position estimate is not accurate enough, you may
not be able to lock onto the correct position. It should be within 0.5 meters of the correct
position. This means you will need a system that is receiving active corrections such as an
NTRIP service, base station, or some other method of generating an accurate position
estimate. The GNSS fix quality requirement is only necessary for the initial lock-on.
The process for doing this is as follows.
1) Create a map using Stencil connected to a GNSS unit.
2) Create a geo-registered map using the loop closure tool.
3) Switch to one of four localization modes.
4) Run Choose Map for Localization if it did not ask for it in the previous step.
5) Start Localizing using the pushbutton or start button on the desktop.
6) You should see the current scan frames in white and the localization cloud as multi-
colored dots. The current scan frame will appear at the origin of the localization map.
7) Select (Double-click) Localize using GNSS with a GNSS unit connected to Stencil. It will use
the values in the scan_info.yaml file in the same folder as the localization map to subtract
out the global data and put it into local map coordinates.
8) After a couple of seconds, you should see the current scan overlaid on the localization
map in the correct x, y , z location. The yaw angle may be off initially.
9) The process to determine the correct yaw angle may take several minutes as it searches
for the best match at the current GNSS location. During this time, the position is
invalidated and the localization map disappears. The measure of progress is shown in the
console window as the iteration counts increase. Generally, it reaches into the mid to high
300’s before finding the best match.
10) The position should then jump back to the current location with the correct yaw angle.
Stencil will then start aligning the new scans to the localization map.
11) Once it has locked on, you can move Stencil and it should stay locked onto the map.
12) If all went well, the current scan should be aligned with the localization map. You can
monitor the /map_localization_confidence topic to see when it has locked on. The value
should be in the higher tens of thousands or hundreds of thousands depending on the
environment. You can see this visually if you start the Confidence Plot on the Stencil
desktop. The green line indicates localization lock.
13) IMPORTANT NOTE: The new map created during localization will be correct in local
coordinates. To convert it to global coordinates, you will need to transfer the offsets from