wrapper

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package wrapper is a package that defines an implementation that wraps a partially implemented arm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWrapperArm

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

NewWrapperArm returns a wrapper component for another arm.

Types

type Arm

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

Arm wraps a partial implementation of another arm.

func (*Arm) CurrentInputs

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

CurrentInputs returns the current inputs of the arm.

func (*Arm) EndPosition

func (wrapper *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 (wrapper *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 (wrapper *Arm) GoToInputs(ctx context.Context, inputSteps ...[]referenceframe.Input) error

GoToInputs moves the arm to the specified goal inputs.

func (*Arm) IsMoving

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

IsMoving returns whether the arm is moving.

func (*Arm) JointPositions

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

JointPositions returns the set joints.

func (*Arm) ModelFrame

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

ModelFrame returns the dynamic frame of the model.

func (*Arm) MoveThroughJointPositions added in v0.50.0

func (wrapper *Arm) MoveThroughJointPositions(
	ctx context.Context,
	positions [][]referenceframe.Input,
	_ *arm.MoveOptions,
	_ map[string]interface{},
) error

MoveThroughJointPositions moves the arm sequentially through the given joints.

func (*Arm) MoveToJointPositions

func (wrapper *Arm) MoveToJointPositions(ctx context.Context, joints []referenceframe.Input, extra map[string]interface{}) error

MoveToJointPositions sets the joints.

func (*Arm) MoveToPosition

func (wrapper *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 (wrapper *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 (wrapper *Arm) Stop(ctx context.Context, extra map[string]interface{}) error

Stop stops the actual arm.

type Config added in v0.2.36

type Config struct {
	ModelFilePath string `json:"model-path"`
	ArmName       string `json:"arm-name"`
}

Config is used for converting config attributes.

func (*Config) Validate added in v0.2.36

func (cfg *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