base

package
v0.0.0-...-2f1770f Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RosBaseModel = resource.NewModel("viamlabs", "ros", "base")

Functions

func NewTrackedBase

func NewTrackedBase(
	ctx context.Context,
	deps resource.Dependencies,
	conf resource.Config,
	logger golog.Logger,
) (viambase.Base, error)

Types

type RosBase

type RosBase struct {
	resource.Named
	// contains filtered or unexported fields
}

func (*RosBase) Close

func (r *RosBase) Close(_ context.Context) error

func (*RosBase) Geometries

func (r *RosBase) Geometries(_ context.Context, _ map[string]interface{}) ([]spatialmath.Geometry, error)

func (*RosBase) IsMoving

func (r *RosBase) IsMoving(_ context.Context) (bool, error)

func (*RosBase) MoveStraight

func (r *RosBase) MoveStraight(
	ctx context.Context,
	distanceMm int,
	mmPerSec float64,
	extra map[string]interface{},
) error

func (*RosBase) Properties

func (r *RosBase) Properties(
	_ context.Context,
	_ map[string]interface{},
) (viambase.Properties, error)

func (*RosBase) Reconfigure

func (r *RosBase) Reconfigure(
	_ context.Context,
	_ resource.Dependencies,
	conf resource.Config,
) error

Reconfigure clean this up

func (*RosBase) SetPower

func (r *RosBase) SetPower(
	_ context.Context,
	linear r3.Vector,
	angular r3.Vector,
	_ map[string]interface{},
) error

func (*RosBase) SetVelocity

func (r *RosBase) SetVelocity(
	_ context.Context,
	linear r3.Vector,
	angular r3.Vector,
	_ map[string]interface{},
) error

func (*RosBase) Spin

func (r *RosBase) Spin(
	ctx context.Context,
	angleDeg,
	degsPerSec float64,
	extra map[string]interface{},
) error

func (*RosBase) Stop

func (r *RosBase) Stop(_ context.Context, _ map[string]interface{}) error

type RosBaseConfig

type RosBaseConfig struct {
	NodeName   string `json:"node_name"`
	PrimaryUri string `json:"primary_uri"`
	Topic      string `json:"topic"`
	TimeRate   int64  `json:"time_rate_ms"` // in ms
}

func (*RosBaseConfig) Validate

func (cfg *RosBaseConfig) Validate(path string) ([]string, error)

Jump to

Keyboard shortcuts

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