The SLAM module is an optional on-board module of the rc_visard and requires a separate SLAM license to be purchased. If a SLAM license is stored on the rc_visard, then the SLAM module is shown as Available on the Web GUI’s License section of the System page.
The SLAM module is part of the sensor dynamics module. It provides additional accuracy for the pose estimate of the stereo INS. When the rc_visard moves through the world, the pose estimate slowly accumulates errors over time. The SLAM module can correct these pose errors by recognizing previously visited places.
The acronym SLAM stands for Simultaneous Localization and Mapping. The SLAM module creates a map consisting of the image features as used in the visual odometry module. The map is later used to correct accumulated pose errors. This is most apparent in applications where, e.g., a robot returns to a previously visited place after covering a large distance (this is called a loop closure). In this case, the robot can re-detect image features that are already stored in its map and can use this information to correct the drift in the pose estimate that accumulated since the last visit.
When closing a loop, not only the current pose, but also the past pose estimates (the trajectory of the rc_visard), are corrected. Continuous trajectory correction leads to a more accurate map. On the other hand, the accuracy of the full trajectory is important when it is used to build an integrated world model, e.g., by projecting the 3D point clouds obtained (see Computing depth images and point clouds) into a common coordinate frame. The full trajectory can be requested from the SLAM module for this purpose.
The pose estimate of the SLAM module will be initialized with the current estimate of the stereo INS - and thus the origin will be where the stereo INS was started.
Since the SLAM module builds on the motion estimates of the stereo INS module, the latter will automatically be started up if it is not yet running when SLAM is started.
The full trajectory is available through the service
below for details.
To store the feature map on the rc_visard, the SLAM module provides the service
save_map, which can be used only during runtime (state “RUNNING”) or after stopping
A stored map can be loaded before startup using the service
which is only applicable in state “IDLE” (use the
reset service to go back to “IDLE”
when SLAM is in state “HALTED”). Note that mistaken localization at (visually) similar places may happen more
easily when initially localizing in a loaded map than when localizing during continuous operation.
Choosing a starting point with a unique visual appearance avoids this problem.
The SLAM module will therefore assume that the rc_visard is started in the rough vicinity
(a few meters) of the origin of the map. The origin of the map is where the Stereo-INS
module was started when the map was recorded.
In contrast to the other software modules running on the rc_visard, the SLAM module needs to accumulate data over time, e.g., motion measurements and image features. Further, the optimization of the trajectory requires substantial amounts of memory, particularly when closing large loops. Therefore the memory requirements of the SLAM module increase over time.
Given the memory limitations of the hardware, the SLAM module needs to reduce its own memory footprint when running continuously. When the available memory runs low, the SLAM module will fix parts of the trajectory, i.e. no further optimization will be done on these parts. A minimum of 10 minutes of the trajectory will be kept unfixed at all times.
When the available memory runs low despite the above measures, two options are available. The first option is that the SLAM module automatically goes to the HALTED state, where it stops processing, but the trajectory (up to the stopping time) is still available. This is the default behavior.
The second option is to keep running until the memory is exhausted. In that
case, the SLAM module will be restarted. If the
autorecovery parameter is set
to true, the SLAM module will recover its previous position and resume
mapping. Otherwise it will go to FATAL state, requiring to be restarted via
the rc_dynamics interface (see Services).
The operation time until the memory limit is reached is strongly dependent on the trajectory of the sensor.
Because of the memory limitations, it is not recommended to run SLAM at the same time as Stereo matching in full resolution, because the memory available to SLAM will be greatly reduced. In the worst case, a long running SLAM process may even be forcefully reset, when full-resolution stereo matching is turned on.
The SLAM module is called
rc_slam in the REST-API. The user can
change the SLAM parameters using the
This module offers the following run-time parameters:
||bool||false||true||true||In case of fatal errors recover corrected position and restart mapping|
||bool||false||true||true||When the memory runs low, go to halted state|
This module reports the following status values:
||Number of frames that constitute the map|
||The current state of the rc_slam node|
||Number of poses in the estimated trajectory|
state can take one of the following values.
|IDLE||The module is ready, but idle. No trajectory data is available.|
|WAITING_FOR_DATA||The module was started but is waiting for data from stereo INS or VO.|
|RUNNING||The module is running.|
|HALTED||The module is stopped. The trajectory data is still available. No new information is processed.|
|RESETTING||The module is being stopped and the internal data is being cleared.|
|RESTARTING||The module is being restarted.|
|FATAL||A fatal error has occurred.|
Activation and deactivation of the SLAM module is done via the service interface of rc_dynamics (see Services).
Each service response (except for the
reset service) contains a
which consists of a
value plus an optional
A successful service returns with a
return_code value of
return_code values indicate that the service failed.
return_code values indicate that the service succeeded with additional information.
The SLAM module offers the following services.
returns the trajectory.
This service can be called as follows.PUT http://<host>/api/v1/nodes/rc_slam/services/get_trajectory
stores the current state as a map to persistent memory. The map consists of a set of fixed map frames. It does not contain the full trajectory that has been covered.
This service can be called as follows.PUT http://<host>/api/v1/nodes/rc_slam/services/save_map
Only abstract feature positions and descriptions are stored in the map. No actual footage of the cameras is stored with the map, nor is it possible to reconstruct images or image parts from the stored information.
The map is lost on software updates or rollbacks
loads a previously saved map.
This is only applicable when the SLAM module is IDLE. It is not possible to load a map into a running system. A loaded map can be cleared with the
This service can be called as follows.PUT http://<host>/api/v1/nodes/rc_slam/services/load_map
removes the stored map from the persistent memory.
This service can be called as follows.PUT http://<host>/api/v1/nodes/rc_slam/services/remove_map
clears the internal state of the SLAM module.
This service is to be used after stopping the SLAM module using the rc_dynamics interface (see the respective Services). The SLAM module maintains the estimate of the full trajectory even when stopped. This service clears this estimate and frees the respective memory. The returned status is RESETTING.
This service can be called as follows.PUT http://<host>/api/v1/nodes/rc_slam/services/reset