gripper

package
v0.2.27 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: AGPL-3.0 Imports: 18 Imported by: 2

Documentation

Overview

Package gripper contains a gRPC based gripper client.

Package gripper defines a robotic gripper.

Package gripper contains a gRPC based gripper service server.

Index

Constants

View Source
const SubtypeName = resource.SubtypeName("gripper")

SubtypeName is a constant that identifies the component resource subtype string.

Variables

View Source
var (

	// ErrStopUnimplemented is used for when Stop() is unimplemented.
	ErrStopUnimplemented = errors.New("Stop() unimplemented")
)

Subtype is a constant that identifies the component resource subtype.

Functions

func CreateStatus

func CreateStatus(ctx context.Context, resource interface{}) (*commonpb.ActuatorStatus, error)

CreateStatus creates a status from the gripper.

func Named

func Named(name string) resource.Name

Named is a helper for getting the named grippers's typed resource name.

func NamesFromRobot

func NamesFromRobot(r robot.Robot) []string

NamesFromRobot is a helper for getting all gripper names from the given Robot.

func NewServer

NewServer constructs an gripper gRPC service server.

func NewUnimplementedInterfaceError

func NewUnimplementedInterfaceError(actual interface{}) error

NewUnimplementedInterfaceError is used when there is a failed interface check.

func NewUnimplementedLocalInterfaceError

func NewUnimplementedLocalInterfaceError(actual interface{}) error

NewUnimplementedLocalInterfaceError is used when there is a failed interface check.

func WrapWithReconfigurable

func WrapWithReconfigurable(r interface{}, name resource.Name) (resource.Reconfigurable, error)

WrapWithReconfigurable wraps a gripper with a reconfigurable and locking interface.

Types

type Gripper

type Gripper interface {
	// Open opens the gripper.
	// This will block until done or a new operation cancels this one
	Open(ctx context.Context, extra map[string]interface{}) error

	// Grab makes the gripper grab.
	// returns true if we grabbed something.
	// This will block until done or a new operation cancels this one
	Grab(ctx context.Context, extra map[string]interface{}) (bool, error)

	// Stop stops the gripper. It is assumed the gripper stops immediately.
	Stop(ctx context.Context, extra map[string]interface{}) error

	generic.Generic
	referenceframe.ModelFramer
	resource.MovingCheckable
}

A Gripper represents a physical robotic gripper.

func FromRobot

func FromRobot(r robot.Robot, name string) (Gripper, error)

FromRobot is a helper for getting the named Gripper from the given Robot.

func NewClientFromConn

func NewClientFromConn(ctx context.Context, conn rpc.ClientConn, name string, logger golog.Logger) Gripper

NewClientFromConn constructs a new Client from connection passed in.

type LocalGripper

type LocalGripper interface {
	Gripper
}

A LocalGripper represents a Gripper that can report whether it is moving or not.

Directories

Path Synopsis
Package fake implements a fake gripper.
Package fake implements a fake gripper.
Package register registers all relevant grippers and also subtype specific functions
Package register registers all relevant grippers and also subtype specific functions
Package robotiq implements the gripper from robotiq.
Package robotiq implements the gripper from robotiq.
Package softrobotics implements the vacuum gripper from Soft Robotics.
Package softrobotics implements the vacuum gripper from Soft Robotics.
vgripper
v1
Package vgripper implements versions of the Viam gripper.
Package vgripper implements versions of the Viam gripper.
Package yahboom implements a yahboom based gripper.
Package yahboom implements a yahboom based gripper.

Jump to

Keyboard shortcuts

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