Documentation ¶
Overview ¶
Package viamcartographer implements simultaneous localization and mapping. This is an Experimental package.
Index ¶
- Constants
- Variables
- func CheckQuaternionFromClientAlgo(pose spatialmath.Pose, componentReference string, ...) (spatialmath.Pose, string, error)
- func InitCartoLib(logger golog.Logger) error
- func New(ctx context.Context, deps resource.Dependencies, c resource.Config, ...) (slam.Service, error)
- func TerminateCartoLib() error
- type CartographerService
- func (cartoSvc *CartographerService) Close(ctx context.Context) error
- func (cartoSvc *CartographerService) DoCommand(ctx context.Context, req map[string]interface{}) (map[string]interface{}, error)
- func (cartoSvc *CartographerService) InternalState(ctx context.Context) (func() ([]byte, error), error)
- func (cartoSvc *CartographerService) LatestMapInfo(ctx context.Context) (time.Time, error)
- func (cartoSvc *CartographerService) PointCloudMap(ctx context.Context) (func() ([]byte, error), error)
- func (cartoSvc *CartographerService) Position(ctx context.Context) (spatialmath.Pose, string, error)
- type IMU
- type Lidar
- type SubAlgo
Constants ¶
const (
// DefaultExecutableName is what this program expects to call to start the cartographer grpc server.
DefaultExecutableName = "carto_grpc_server"
)
Variables ¶
var ( Model = resource.NewModel("viam", "slam", "cartographer") // ErrClosed denotes that the slam service method was called on a closed slam resource. ErrClosed = errors.Errorf("resource (%s) is closed", Model.String()) // ErrUseCloudSlamEnabled denotes that the slam service method was called while use_cloud_slam was set to true. ErrUseCloudSlamEnabled = errors.Errorf("resource (%s) unavailable, configured with use_cloud_slam set to true", Model.String()) )
Model is the model name of cartographer.
Functions ¶
func CheckQuaternionFromClientAlgo ¶ added in v0.3.22
func CheckQuaternionFromClientAlgo(pose spatialmath.Pose, componentReference string, returnedExt map[string]interface{}, ) (spatialmath.Pose, string, error)
CheckQuaternionFromClientAlgo checks to see if the internal SLAM algorithm sent a quaternion. If it did, return the updated pose.
func InitCartoLib ¶ added in v0.3.22
InitCartoLib is run to initialize the cartographer library must be called before module.AddModelFromRegistry is called.
func New ¶
func New( ctx context.Context, deps resource.Dependencies, c resource.Config, logger golog.Logger, sensorValidationMaxTimeoutSec int, sensorValidationIntervalSec int, cartoFacadeTimeout time.Duration, cartoFacadeInternalTimeout time.Duration, testTimedLidarSensorOverride s.TimedLidarSensor, testTimedIMUSensorOverride s.TimedIMUSensor, ) (slam.Service, error)
New returns a new slam service for the given robot.
func TerminateCartoLib ¶ added in v0.3.22
func TerminateCartoLib() error
TerminateCartoLib is run to terminate the cartographer library.
Types ¶
type CartographerService ¶ added in v0.3.22
type CartographerService struct { resource.Named resource.AlwaysRebuild SlamMode cartofacade.SlamMode // contains filtered or unexported fields }
CartographerService is the structure of the slam service.
func (*CartographerService) Close ¶ added in v0.3.22
func (cartoSvc *CartographerService) Close(ctx context.Context) error
Close out of all slam related processes.
func (*CartographerService) DoCommand ¶ added in v0.3.22
func (cartoSvc *CartographerService) DoCommand(ctx context.Context, req map[string]interface{}) (map[string]interface{}, error)
DoCommand receives arbitrary commands.
func (*CartographerService) InternalState ¶ added in v0.3.27
func (cartoSvc *CartographerService) InternalState(ctx context.Context) (func() ([]byte, error), error)
InternalState creates a request, calls the slam algorithms InternalState endpoint and returns a callback function which will return the next chunk of the current internal state of the slam algo.
func (*CartographerService) LatestMapInfo ¶ added in v0.3.27
LatestMapInfo returns a new timestamp every time it is called when in mapping mode, to signal that the map should be updated. In localizing, the timestamp returned is the timestamp of the session.
func (*CartographerService) PointCloudMap ¶ added in v0.3.27
func (cartoSvc *CartographerService) PointCloudMap(ctx context.Context) (func() ([]byte, error), error)
PointCloudMap creates a request calls the slam algorithms PointCloudMap endpoint and returns a callback function which will return the next chunk of the current pointcloud map.
func (*CartographerService) Position ¶ added in v0.3.27
func (cartoSvc *CartographerService) Position(ctx context.Context) (spatialmath.Pose, string, error)
Position forwards the request for positional data to the slam library's gRPC service. Once a response is received, it is unpacked into a Pose and a component reference string.
type IMU ¶ added in v0.3.25
type IMU struct {
// contains filtered or unexported fields
}
IMU is the structure containing all fields related to IMU.
Directories ¶
Path | Synopsis |
---|---|
Package cartofacade contains the api to call into CGO
|
Package cartofacade contains the api to call into CGO |
Package config implements functions to assist with attribute evaluation in the SLAM service.
|
Package config implements functions to assist with attribute evaluation in the SLAM service. |
Package main is a module with a cartographer SLAM service model.
|
Package main is a module with a cartographer SLAM service model. |
Package sensorprocess contains the logic to add lidar or replay sensor readings to cartographer's cartofacade
|
Package sensorprocess contains the logic to add lidar or replay sensor readings to cartographer's cartofacade |
Package sensors defines interfaces for sensors used by viam cartographer
|
Package sensors defines interfaces for sensors used by viam cartographer |
Package testhelper provides test helpers which don't depend on viamcartographer
|
Package testhelper provides test helpers which don't depend on viamcartographer |