Documentation
¶
Overview ¶
Package slam implements simultaneous localization and mapping. This is an Experimental package.
Index ¶
- Constants
- Variables
- func GetInternalStateFull(ctx context.Context, slamSvc Service) ([]byte, error)
- func GetPointCloudMapFull(ctx context.Context, slamSvc Service) ([]byte, error)
- func HelperConcatenateChunksToFull(f func() ([]byte, error)) ([]byte, error)
- func Named(name string) resource.Name
- func NewServer(s subtype.Service) pb.SLAMServiceServer
- func NewUnimplementedInterfaceError(actual interface{}) error
- func WrapWithReconfigurable(s interface{}, name resource.Name) (resource.Reconfigurable, error)
- type Library
- type LibraryMetadata
- type Mode
- type Service
Constants ¶
const ( // Dense is a Library type. Dense = Library(iota) // Sparse is a Library type. Sparse // Mono is a mode a slam model can use. Mono = Mode("mono") // Rgbd is a mode a slam model can use. Rgbd = Mode("rgbd") // Dim2d is a mode a slam model can use. Dim2d = Mode("2d") // Dim3d is a mode a slam model can use. Dim3d = Mode("3d") )
const SubtypeName = resource.SubtypeName("slam")
SubtypeName is the name of the type of service.
Variables ¶
var SLAMLibraries = map[string]LibraryMetadata{
"cartographer": cartographerMetadata,
"orbslamv3": orbslamv3Metadata,
}
SLAMLibraries contains a map of available slam libraries.
var Subtype = resource.NewSubtype( resource.ResourceNamespaceRDK, resource.ResourceTypeService, SubtypeName, )
Subtype is a constant that identifies the slam resource subtype.
Functions ¶
func GetInternalStateFull ¶ added in v0.2.21
GetInternalStateFull concatenates the streaming responses from GetInternalState into the internal serialized state of the slam algorithm.
func GetPointCloudMapFull ¶ added in v0.2.21
GetPointCloudMapFull concatenates the streaming responses from GetPointCloudMap into a full point cloud.
func HelperConcatenateChunksToFull ¶ added in v0.2.35
HelperConcatenateChunksToFull concatenates the chunks from a streamed grpc endpoint.
func NewServer ¶
func NewServer(s subtype.Service) pb.SLAMServiceServer
NewServer constructs a the slam gRPC service server.
func NewUnimplementedInterfaceError ¶ added in v0.1.0
func NewUnimplementedInterfaceError(actual interface{}) error
NewUnimplementedInterfaceError is used when there is a failed interface check.
func WrapWithReconfigurable ¶
func WrapWithReconfigurable(s interface{}, name resource.Name) (resource.Reconfigurable, error)
WrapWithReconfigurable wraps a slam service as a Reconfigurable.
Types ¶
type LibraryMetadata ¶
type LibraryMetadata struct { AlgoName string AlgoType Library SlamMode map[string]Mode BinaryLocation string }
LibraryMetadata contains all pertinent information for defining a SLAM library/algorithm including the Sparse/Dense definition.
type Service ¶
type Service interface { GetPosition(context.Context) (spatialmath.Pose, string, error) GetPointCloudMap(ctx context.Context) (func() ([]byte, error), error) GetInternalState(ctx context.Context) (func() ([]byte, error), error) resource.Generic }
Service describes the functions that are available to the service.
func FromRobot ¶ added in v0.2.32
FromRobot is a helper for getting the named SLAM service from the given Robot.
func NewClientFromConn ¶
func NewClientFromConn(ctx context.Context, conn rpc.ClientConn, name string, logger golog.Logger) Service
NewClientFromConn constructs a new Client from the connection passed in.
Directories
¶
Path | Synopsis |
---|---|
Package builtin implements simultaneous localization and mapping.
|
Package builtin implements simultaneous localization and mapping. |
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 subtype specific functions
|
Package register registers all relevant slam models and also subtype specific functions |
slam_copy
|
|
config
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 |
dataprocess
Package dataprocess manages code related to the data-saving process
|
Package dataprocess manages code related to the data-saving process |
testhelper
Package testhelper provides helper functions for testing implementations of slam libraries
|
Package testhelper provides helper functions for testing implementations of slam libraries |
utils
Package utils contains helper functions for the slam library implementations
|
Package utils contains helper functions for the slam library implementations |