fake

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package fake implements a fake arm.

Index

Constants

This section is empty.

Variables

View Source
var Model = resource.DefaultModelFamily.WithModel("fake")

Model is the name used to refer to the fake arm model.

Functions

func NewArm

func NewArm(ctx context.Context, deps resource.Dependencies, conf resource.Config, logger logging.Logger) (arm.Arm, error)

NewArm returns a new fake arm.

Types

type Arm

type Arm struct {
	resource.Named
	CloseCount int
	// contains filtered or unexported fields
}

Arm is a fake arm that can simply read and set properties.

func (*Arm) Close

func (a *Arm) Close(ctx context.Context) error

Close does nothing.

func (*Arm) CurrentInputs

func (a *Arm) CurrentInputs(ctx context.Context) ([]referenceframe.Input, error)

CurrentInputs TODO.

func (*Arm) EndPosition

func (a *Arm) EndPosition(ctx context.Context, extra map[string]interface{}) (spatialmath.Pose, error)

EndPosition returns the set position.

func (*Arm) Geometries added in v0.2.50

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

Geometries returns the list of geometries associated with the resource, in any order. The poses of the geometries reflect their current location relative to the frame of the resource.

func (*Arm) GoToInputs

func (a *Arm) GoToInputs(ctx context.Context, inputSteps ...[]referenceframe.Input) error

GoToInputs TODO.

func (*Arm) IsMoving

func (a *Arm) IsMoving(ctx context.Context) (bool, error)

IsMoving is always false for a fake arm.

func (*Arm) JointPositions

func (a *Arm) JointPositions(ctx context.Context, extra map[string]interface{}) (*pb.JointPositions, error)

JointPositions returns joints.

func (*Arm) ModelFrame

func (a *Arm) ModelFrame() referenceframe.Model

ModelFrame returns the dynamic frame of the model.

func (*Arm) MoveToJointPositions

func (a *Arm) MoveToJointPositions(ctx context.Context, joints *pb.JointPositions, extra map[string]interface{}) error

MoveToJointPositions sets the joints.

func (*Arm) MoveToPosition

func (a *Arm) MoveToPosition(ctx context.Context, pos spatialmath.Pose, extra map[string]interface{}) error

MoveToPosition sets the position.

func (*Arm) Reconfigure added in v0.2.36

func (a *Arm) Reconfigure(ctx context.Context, deps resource.Dependencies, conf resource.Config) error

Reconfigure atomically reconfigures this arm in place based on the new config.

func (*Arm) Stop

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

Stop doesn't do anything for a fake arm.

type Config added in v0.2.36

type Config struct {
	ArmModel      string `json:"arm-model,omitempty"`
	ModelFilePath string `json:"model-path,omitempty"`
}

Config is used for converting config attributes.

func (*Config) Validate added in v0.2.36

func (conf *Config) Validate(path string) ([]string, error)

Validate ensures all parts of the config are valid.

Jump to

Keyboard shortcuts

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