slam

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: AGPL-3.0 Imports: 39 Imported by: 12

Documentation

Overview

Package slam implements simultaneous localization and mapping

Package slam implements simultaneous localization and mapping

Index

Constants

View Source
const SubtypeName = resource.SubtypeName("slam")

SubtypeName is the name of the type of service.

Variables

View Source
var SLAMLibraries = map[string]LibraryMetadata{
	"cartographer": cartographerMetadata,
	"orbslamv3":    orbslamv3Metadata,
}

SLAMLibraries contains a map of available slam libraries.

Subtype is a constant that identifies the slam resource subtype.

Functions

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 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

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.

Directories

Path Synopsis
Package internal implements a slam service definition with additional exported functions for the purpose of testing
Package internal implements a slam service definition with additional exported functions for the purpose of testing

Jump to

Keyboard shortcuts

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