chassis

package
v0.0.0-...-7a59755 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chassis

type Chassis struct {
	*internal.BaseModule
	// contains filtered or unexported fields
}

Chassis allows controlling the robot chassis. It also works as the robot main controller interface.

func New

New creates a new Chassis instance.

func (*Chassis) Move

func (c *Chassis) Move(leftStick *controller.StickPosition,
	rightStick *controller.StickPosition, m controller.Mode) error

Move moves the robot using the given stick positions and control mode.

func (*Chassis) SetControllerMode

func (c *Chassis) SetControllerMode(m controller.Mode) error

SetControllerMode sets the controller mode for the robot.

func (*Chassis) SetMode

func (c *Chassis) SetMode(m Mode) error

SetMode sets the chassis mode for the robot.

func (*Chassis) SetPosition

func (c *Chassis) SetPosition(m Mode, x, y, z float64) error

SetPosition sets the chassis position.

func (*Chassis) SetSpeed

func (c *Chassis) SetSpeed(m Mode, x, y, z float64) error

SetSpeed sets the chassis speed. Limits are [-3.5, 3.5] (m/s) for x and y and [-360, 360] (degrees/s) for z.

func (*Chassis) StopMovement

func (c *Chassis) StopMovement(m Mode) error

StopMovement stops the chassis movement.

type Mode

type Mode int8
const (
	ModeYawFollow Mode = iota
	ModeTank
	ModeFPV
	ModeAngularVelocity
	ModeWayPoint
	ModeNone
)

func (Mode) String

func (m Mode) String() string

func (Mode) Valid

func (m Mode) Valid() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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