Documentation ¶
Overview ¶
Package slam implements simultaneous localization and mapping
Package slam implements simultaneous localization and mapping
Index ¶
Constants ¶
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 NewServer ¶
func NewServer(s subtype.Service) pb.SLAMServiceServer
NewServer constructs a the slam gRPC service server.
func WrapWithReconfigurable ¶
func WrapWithReconfigurable(s interface{}) (resource.Reconfigurable, error)
WrapWithReconfigurable wraps a slam service as a Reconfigurable.
Types ¶
type AttrConfig ¶
type AttrConfig struct { Sensors []string `json:"sensors"` Algorithm string `json:"algorithm"` ConfigParams map[string]string `json:"config_params"` DataRateMs int `json:"data_rate_ms"` MapRateSec int `json:"map_rate_sec"` DataDirectory string `json:"data_dir"` InputFilePattern string `json:"input_file_pattern"` Port string `json:"port"` }
AttrConfig describes how to configure the service.
type LibraryMetadata ¶
type LibraryMetadata struct { AlgoName string AlgoType slamLibrary SlamMode map[string]mode BinaryLocation string }
LibraryMetadata contains all pertinent information for defining a SLAM library/algorithm including the sparse/dense definition.
type ORBsettings ¶
type ORBsettings struct { FileVersion string `yaml:"File.version"` NFeatures int `yaml:"ORBextractor.nFeatures"` ScaleFactor float64 `yaml:"ORBextractor.scaleFactor"` NLevels int `yaml:"ORBextractor.nLevels"` IniThFAST int `yaml:"ORBextractor.iniThFAST"` MinThFAST int `yaml:"ORBextractor.minThFAST"` CamType string `yaml:"Camera.type"` Width int `yaml:"Camera.width"` Height int `yaml:"Camera.height"` Fx float64 `yaml:"Camera1.fx"` Fy float64 `yaml:"Camera1.fy"` Ppx float64 `yaml:"Camera1.cx"` Ppy float64 `yaml:"Camera1.cy"` RadialK1 float64 `yaml:"Camera1.k1"` RadialK2 float64 `yaml:"Camera1.k2"` RadialK3 float64 `yaml:"Camera1.k3"` TangentialP1 float64 `yaml:"Camera1.p1"` TangentialP2 float64 `yaml:"Camera1.p2"` RGBflag int8 `yaml:"Camera.RGB"` Stereob float64 `yaml:"Stereo.b"` StereoThDepth float64 `yaml:"Stereo.ThDepth"` DepthMapFactor float64 `yaml:"RGBD.DepthMapFactor"` FPSCamera int16 `yaml:"Camera.fps"` SaveMapLoc string `yaml:"System.SaveAtlasToFile"` LoadMapLoc string `yaml:"System.LoadAtlasFromFile"` }
ORBsettings is used to construct the yaml file.
type Service ¶
type Service interface { GetPosition(context.Context, string) (*referenceframe.PoseInFrame, error) GetMap(context.Context, string, string, *referenceframe.PoseInFrame, bool) (string, image.Image, *vision.Object, error) }
Service describes the functions that are available to the service.
func New ¶
func New(ctx context.Context, r robot.Robot, config config.Service, logger golog.Logger) (Service, error)
New returns a new slam service for 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.