yahboom

package
v0.5.1-rc0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package yahboom implements a yahboom based robot. code with commands found at http://www.yahboom.net/study/Dofbot-Pi

Index

Constants

This section is empty.

Variables

View Source
var Model = resource.DefaultModelFamily.WithModel("yahboom-dofbot")

Model is the model used to refer to the yahboom model.

Functions

func MakeModelFrame added in v0.2.36

func MakeModelFrame(name string) (referenceframe.Model, error)

MakeModelFrame returns the kinematics model of the yahboom arm, also has all Frame information.

func NewDofBot added in v0.1.3

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

NewDofBot is a constructor to create a new dofbot arm.

Types

type Config added in v0.2.36

type Config struct {
	Board string `json:"board"`
	I2C   string `json:"i2c"`
}

Config is the config for a yahboom arm.

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.

type Dofbot

type Dofbot struct {
	resource.Named
	resource.AlwaysRebuild
	// contains filtered or unexported fields
}

Dofbot implements a yahboom dofbot arm. It would be nice to reconfigure atomically but this just rebuilds right now until someone implements it.

func (*Dofbot) Close

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

Close closes the arm.

func (*Dofbot) CurrentInputs

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

CurrentInputs returns the current inputs of the arm.

func (*Dofbot) EndPosition

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

EndPosition returns the current position of the arm.

func (*Dofbot) Geometries added in v0.2.50

func (a *Dofbot) Geometries(ctx context.Context) ([]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 (*Dofbot) GoToInputs

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

GoToInputs moves the arm to the specified goal inputs.

func (*Dofbot) Grab

func (a *Dofbot) Grab(ctx context.Context) (bool, error)

Grab makes the gripper grab. Approach: Move to close, poll until gripper reaches the closed state (position > grabAngle) or the position changes little (< minMovement) between iterations.

func (*Dofbot) GripperStop

func (a *Dofbot) GripperStop(ctx context.Context) error

GripperStop is unimplemented for the dofbot.

func (*Dofbot) IsMoving

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

IsMoving returns whether the arm is moving.

func (*Dofbot) JointPositions

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

JointPositions returns the current joint positions of the arm.

func (*Dofbot) ModelFrame

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

ModelFrame returns all the information necessary for including the arm in a FrameSystem.

func (*Dofbot) MoveToJointPositions

func (a *Dofbot) MoveToJointPositions(ctx context.Context, pos *componentpb.JointPositions, extra map[string]interface{}) error

MoveToJointPositions moves the arm's joints to the given positions.

func (*Dofbot) MoveToPosition

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

MoveToPosition moves the arm to the given absolute position.

func (*Dofbot) Open

func (a *Dofbot) Open(ctx context.Context) error

Open opens the gripper.

func (*Dofbot) Stop

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

Stop is unimplemented for the dofbot.

Jump to

Keyboard shortcuts

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