slam

package
v0.2.43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2023 License: AGPL-3.0 Imports: 13 Imported by: 9

Documentation

Overview

Package slam implements simultaneous localization and mapping. This is an Experimental package.

Index

Constants

View Source
const SubtypeName = "slam"

SubtypeName is the name of the type of service.

Variables

View Source
var API = resource.APINamespaceRDK.WithServiceType(SubtypeName)

API is a variable that identifies the slam resource API.

Functions

func GetInternalStateFull added in v0.2.21

func GetInternalStateFull(ctx context.Context, slamSvc Service) ([]byte, error)

GetInternalStateFull concatenates the streaming responses from GetInternalState into the internal serialized state of the slam algorithm.

func GetPointCloudMapFull added in v0.2.21

func GetPointCloudMapFull(ctx context.Context, slamSvc Service) ([]byte, error)

GetPointCloudMapFull concatenates the streaming responses from GetPointCloudMap into a full point cloud.

func HelperConcatenateChunksToFull added in v0.2.35

func HelperConcatenateChunksToFull(f func() ([]byte, error)) ([]byte, error)

HelperConcatenateChunksToFull concatenates the chunks from a streamed grpc endpoint.

func Named added in v0.0.8

func Named(name string) resource.Name

Named is a helper for getting the named service's typed resource name.

func NewRPCServiceServer added in v0.2.36

func NewRPCServiceServer(coll resource.APIResourceCollection[Service]) interface{}

NewRPCServiceServer constructs a the slam gRPC service server. It is intentionally untyped to prevent use outside of tests.

Types

type Service

type Service interface {
	resource.Resource
	GetPosition(context.Context) (spatialmath.Pose, string, error)
	GetPointCloudMap(ctx context.Context) (func() ([]byte, error), error)
	GetInternalState(ctx context.Context) (func() ([]byte, error), error)
}

Service describes the functions that are available to the service.

func FromRobot added in v0.2.32

func FromRobot(r robot.Robot, name string) (Service, error)

FromRobot is a helper for getting the named SLAM service from the given Robot.

func NewClientFromConn

func NewClientFromConn(
	ctx context.Context,
	conn rpc.ClientConn,
	remoteName string,
	name resource.Name,
	logger golog.Logger,
) (Service, error)

NewClientFromConn constructs a new Client from the connection passed in.

Directories

Path Synopsis
Package fake implements a fake slam service
Package fake implements a fake slam service
Package grpchelper implements helper functions to be used with slam service grpc clients
Package grpchelper implements helper functions to be used with slam service grpc clients
internal
testhelper
Package testhelper implements a slam service definition with additional exported functions for the purpose of testing
Package testhelper implements a slam service definition with additional exported functions for the purpose of testing
Package register registers all relevant slam models and also API specific functions
Package register registers all relevant slam models and also API specific functions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL