fake

package
v0.2.44 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: AGPL-3.0 Imports: 11 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

func NewBase(ctx context.Context, conf resource.Config) (base.LocalBase, error)

NewBase instantiates a new base of the fake model type.

Types

type Base

type Base struct {
	resource.Named
	resource.TriviallyReconfigurable
	CloseCount int
	// 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) 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) 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.

func (*Base) Width

func (b *Base) Width(ctx context.Context) (int, error)

Width returns some arbitrary width.

func (*Base) WrapWithKinematics added in v0.2.35

func (b *Base) WrapWithKinematics(ctx context.Context, slamSvc slam.Service) (base.KinematicBase, error)

WrapWithKinematics creates a KinematicBase from the fake Base so that it satisfies the ModelFramer and InputEnabled interfaces.

Jump to

Keyboard shortcuts

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