fake

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fake implements a fake base.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBase added in v0.2.35

NewBase instantiates a new base of the fake model type.

Types

type Base

type Base struct {
	resource.Named
	resource.TriviallyReconfigurable
	CloseCount               int
	WidthMeters              float64
	TurningRadius            float64
	WheelCircumferenceMeters float64
	Geometry                 []spatialmath.Geometry
	// contains filtered or unexported fields
}

Base is a fake base that returns what it was provided in each method.

func (*Base) Close

func (b *Base) Close(ctx context.Context) error

Close does nothing.

func (*Base) Geometries added in v0.3.0

func (b *Base) Geometries(ctx context.Context, extra map[string]interface{}) ([]spatialmath.Geometry, error)

Geometries returns the geometries associated with the fake base.

func (*Base) IsMoving

func (b *Base) IsMoving(ctx context.Context) (bool, error)

IsMoving always returns false.

func (*Base) MoveStraight

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

MoveStraight does nothing.

func (*Base) Properties added in v0.2.50

func (b *Base) Properties(ctx context.Context, extra map[string]interface{}) (base.Properties, error)

Properties returns the base's properties.

func (*Base) SetPower

func (b *Base) SetPower(ctx context.Context, linear, angular r3.Vector, extra map[string]interface{}) error

SetPower does nothing.

func (*Base) SetVelocity

func (b *Base) SetVelocity(ctx context.Context, linear, angular r3.Vector, extra map[string]interface{}) error

SetVelocity does nothing.

func (*Base) Spin

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

Spin does nothing.

func (*Base) Stop

func (b *Base) Stop(ctx context.Context, extra map[string]interface{}) error

Stop does nothing.

Jump to

Keyboard shortcuts

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