wrapper

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const ModelName = "wrapper_arm"

ModelName defines the model name to be used when specifying wrapper arms in configs.

Variables

This section is empty.

Functions

func NewWrapperArm

func NewWrapperArm(cfg config.Component, r robot.Robot, logger golog.Logger) (arm.LocalArm, error)

NewWrapperArm returns a wrapper component for another arm.

Types

type Arm

type Arm struct {
	generic.Unimplemented
	Name string
	// 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{}) (*commonpb.Pose, error)

EndPosition returns the set position.

func (*Arm) GoToInputs

func (wrapper *Arm) GoToInputs(ctx context.Context, goal []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{}) (*pb.JointPositions, 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) MoveToJointPositions

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

MoveToJointPositions sets the joints.

func (*Arm) MoveToPosition

func (wrapper *Arm) MoveToPosition(
	ctx context.Context,
	pos *commonpb.Pose,
	worldState *commonpb.WorldState,
	extra map[string]interface{},
) error

MoveToPosition sets the position.

func (*Arm) Stop

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

Stop stops the actual arm.

type AttrConfig

type AttrConfig struct {
	ModelPath string `json:"model-path"`
	ArmName   string `json:"arm-name"`
}

AttrConfig is used for converting config attributes.

func (*AttrConfig) Validate added in v0.1.6

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