SLAM Service
Stability Notice
The SLAM service is an experimental feature. Stability is not guaranteed. Breaking changes are likely to occur, and occur often.
Simultaneous Localization And Mapping (SLAM) allows your machine to create a map of its surroundings and find its location within that map. SLAM is an important area of ongoing research in robotics, particularly for mobile applications such as drones, boats, and rovers.
The Viam SLAM service supports the integration of SLAM as a service on your machine. You can conduct SLAM with data collected live by a RPlidar or with LIDAR data you provide in configuration, and easily view the map you build by clicking on View SLAM library on your location’s page in the Viam app:
Used with
* Required for use
Configuration
Integrated SLAM libraries include the following. Click the model name for configuration instructions.
Model | Description |
---|---|
viam:slam:cartographer | The Cartographer Project performs dense SLAM using LIDAR data. |
viam:cloudslam-wrapper:cloudslam | cloudslam-wrapper Allows you to run supported SLAM algorithms in the cloud. |
API
The SLAM service API supports the following methods:
Method Name | Description |
---|---|
GetPosition | Get the current position of the component the SLAM service is configured to source point cloud data from in the SLAM map as a Pose . |
GetPointCloudMap | Get the point cloud map. |
GetInternalState | Get the internal state of the SLAM algorithm required to continue mapping/localization. |
GetProperties | Get information about the current SLAM session. |
InternalStateFull | InternalStateFull concatenates the streaming responses from InternalState into the internal serialized state of the SLAM algorithm. |
PointCloudMapFull | PointCloudMapFull concatenates the streaming responses from PointCloudMap into a full point cloud. |
Reconfigure | Reconfigure this resource. |
DoCommand | Execute model-specific commands that are not otherwise defined by the service API. |
GetResourceName | Get the ResourceName for this instance of the SLAM service with the given name. |
Close | Safely shut down the resource and prevent further use. |
SLAM mapping best practices
The best way to improve map quality is by taking extra care when creating the initial map. While in a slam session, you should:
- turn gently and gradually, completely avoiding sudden quick turns
- make frequent loop closures, arriving back at a previously mapped area so the machine can correct for errors in the map layout
- stay relatively (but not extremely) close to walls
- use a machine that can go smoothly over bumps and transitions between flooring areas
- drive at a moderate speed
- when using a wheeled base, try to include an odometry movement sensor. This helps the SLAM algorithm keep track of where the machine is moving.
- it is important to note that the adxl345 accelerometer on the Viam Rover 1 will not satisfy the movement sensor requirement.
You can find additional assistance in the Troubleshooting section.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!