gantry

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: AGPL-3.0 Imports: 19 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 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 WrapWithReconfigurable

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

WrapWithReconfigurable wraps a gantry or localGantry with a reconfigurable and locking interface.

Types

type Gantry

type Gantry interface {
	// GetPosition returns the position in meters
	GetPosition(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 *commonpb.WorldState, extra map[string]interface{}) error

	// GetLengths is the length of gantries in meters
	GetLengths(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
}

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 added in v0.0.6

type Lengths struct {
	Lengths []float64
}

Lengths wraps the returns lengths values.

type LocalGantry

type LocalGantry interface {
	Gantry

	resource.MovingCheckable
}

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

type Position added in v0.0.6

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