gantry

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: 20 Imported by: 0

Documentation

Overview

Package gantry contains a gRPC based gantry client.

Package gantry contains a gRPC based gantry service server.

Index

Constants

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

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

Variables

Subtype is a constant that identifies the component resource subtype.

Functions

func CreateStatus

func CreateStatus(ctx context.Context, resource interface{}) (*pb.Status, error)

CreateStatus creates a status from the gantry.

func DependencyTypeError

func DependencyTypeError(name string, actual interface{}) error

DependencyTypeError is used when a resource doesn't implement the expected interface.

func Named

func Named(name string) resource.Name

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

func NamesFromRobot

func NamesFromRobot(r robot.Robot) []string

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

func NewServer

NewServer constructs an gantry 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 gantry or localGantry with a reconfigurable and locking interface.

Types

type Gantry

type Gantry interface {
	// Position returns the position in meters
	Position(ctx context.Context, extra map[string]interface{}) ([]float64, error)

	// MoveToPosition is in meters
	// The worldState argument should be treated as optional by all implementing drivers
	// This will block until done or a new operation cancels this one
	MoveToPosition(ctx context.Context, positionsMm []float64, worldState *referenceframe.WorldState, extra map[string]interface{}) error

	// Lengths is the length of gantries in meters
	Lengths(ctx context.Context, extra map[string]interface{}) ([]float64, error)

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

	generic.Generic
	referenceframe.ModelFramer
	referenceframe.InputEnabled
	resource.MovingCheckable
}

Gantry is used for controlling gantries of N axis.

func FromDependencies

func FromDependencies(deps registry.Dependencies, name string) (Gantry, error)

FromDependencies is a helper for getting the named gantry from a collection of dependencies.

func FromRobot

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

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

func NewClientFromConn

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

NewClientFromConn constructs a new Client from connection passed in.

type Lengths

type Lengths struct {
	Lengths []float64
}

Lengths wraps the returns lengths values.

type LocalGantry

type LocalGantry interface {
	Gantry
}

A LocalGantry represents a Gantry that can report whether it is moving or not.

type Position

type Position struct {
	Position []float64
}

Position wraps the returned position values.

Directories

Path Synopsis
Package fake implements a fake gantry.
Package fake implements a fake gantry.
Package multiaxis implements a multi-axis gantry.
Package multiaxis implements a multi-axis gantry.
Package oneaxis implements a one-axis gantry.
Package oneaxis implements a one-axis gantry.
Package register registers all relevant gantries
Package register registers all relevant gantries

Jump to

Keyboard shortcuts

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