config

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package config implements functions to assist with attribute evaluation in the SLAM service. Warning: The code in this package might be transient. Stability is not guaranteed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineDeleteProcessedData

func DetermineDeleteProcessedData(logger golog.Logger, deleteData *bool, useLiveData bool) bool

DetermineDeleteProcessedData will determine the value of the deleteProcessData attribute based on the useLiveData and deleteData input parameters.

func DetermineUseLiveData

func DetermineUseLiveData(logger golog.Logger, liveData *bool, sensors []string) (bool, error)

DetermineUseLiveData will determine the value of the useLiveData attribute based on the liveData input parameter and sensor list.

func GetOptionalParameters added in v0.1.30

func GetOptionalParameters(config *Config, defaultPort string,
	defaultDataRateMsec, defaultMapRateSec int, logger golog.Logger,
) (string, int, int, bool, bool, error)

GetOptionalParameters sets any unset optional config parameters to the values passed to this function, and returns them.

func SetupDirectories added in v0.1.27

func SetupDirectories(dataDirectory string, logger golog.Logger) error

SetupDirectories creates the data directory at the specified path along with its data, map, and config subdirectories.

func SetupGRPCConnection added in v0.1.27

func SetupGRPCConnection(
	ctx context.Context,
	port string,
	dialMaxTimeoutSec int,
	logger golog.Logger,
) (pb.SLAMServiceClient, func() error, error)

SetupGRPCConnection uses the defined port to create a GRPC client for communicating with the SLAM algorithms.

Types

type Config added in v0.1.34

type Config struct {
	Sensors             []string          `json:"sensors"`
	ConfigParams        map[string]string `json:"config_params"`
	DataDirectory       string            `json:"data_dir"`
	UseLiveData         *bool             `json:"use_live_data"`
	DataRateMsec        int               `json:"data_rate_msec"`
	MapRateSec          *int              `json:"map_rate_sec"`
	Port                string            `json:"port"`
	DeleteProcessedData *bool             `json:"delete_processed_data"`
}

Config describes how to configure the SLAM service.

func (*Config) Validate added in v0.1.34

func (config *Config) Validate(path string) ([]string, error)

Validate creates the list of implicit dependencies.

Jump to

Keyboard shortcuts

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