Documentation ¶
Overview ¶
Package fake implements a fake base.
Index ¶
- func NewBase(_ context.Context, _ resource.Dependencies, conf resource.Config, ...) (base.Base, error)
- type Base
- func (b *Base) Close(ctx context.Context) error
- func (b *Base) Geometries(ctx context.Context, extra map[string]interface{}) ([]spatialmath.Geometry, error)
- func (b *Base) IsMoving(ctx context.Context) (bool, error)
- func (b *Base) MoveStraight(ctx context.Context, distanceMm int, mmPerSec float64, ...) error
- func (b *Base) Properties(ctx context.Context, extra map[string]interface{}) (base.Properties, error)
- func (b *Base) SetPower(ctx context.Context, linear, angular r3.Vector, extra map[string]interface{}) error
- func (b *Base) SetVelocity(ctx context.Context, linear, angular r3.Vector, extra map[string]interface{}) error
- func (b *Base) Spin(ctx context.Context, angleDeg, degsPerSec float64, ...) error
- func (b *Base) Stop(ctx context.Context, extra map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) 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) 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.
Click to show internal directories.
Click to hide internal directories.