mybase

package
v0.2.27 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package mybase implements a base that only supports SetPower (basic forward/back/turn controls.)

Index

Constants

This section is empty.

Variables

View Source
var (
	Model = resource.NewModel("acme", "demo", "mybase")
)

Functions

This section is empty.

Types

type MyBase

type MyBase struct {
	generic.Echo
	// contains filtered or unexported fields
}

func (*MyBase) Close

func (base *MyBase) Close(ctx context.Context) error

func (*MyBase) IsMoving

func (base *MyBase) IsMoving(ctx context.Context) (bool, error)

func (*MyBase) MoveStraight

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

func (*MyBase) Reconfigure

func (base *MyBase) Reconfigure(cfg config.Component, deps registry.Dependencies) error

func (*MyBase) SetPower

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

func (*MyBase) SetVelocity

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

func (*MyBase) Spin

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

func (*MyBase) Stop

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

type MyBaseConfig added in v0.2.25

type MyBaseConfig struct {
	LeftMotor  string `json:"motorL"`
	RightMotor string `json:"motorR"`
}

func (*MyBaseConfig) Validate added in v0.2.25

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

Jump to

Keyboard shortcuts

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