Documentation ¶
Overview ¶
Package gantry contains a gRPC based gantry client.
Package gantry contains a gRPC based gantry service server.
Index ¶
- Constants
- Variables
- func CreateStatus(ctx context.Context, g Gantry) (*pb.Status, error)
- func Named(name string) resource.Name
- func NamesFromRobot(r robot.Robot) []string
- func NewLengthsCollector(resource interface{}, params data.CollectorParams) (data.Collector, error)
- func NewPositionCollector(resource interface{}, params data.CollectorParams) (data.Collector, error)
- func NewRPCServiceServer(coll resource.APIResourceCollection[Gantry]) interface{}
- type Gantry
Constants ¶
const SubtypeName = "gantry"
SubtypeName is a constant that identifies the component resource API string "gantry".
Variables ¶
var API = resource.APINamespaceRDK.WithComponentType(SubtypeName)
API is a variable that identifies the component resource API.
Functions ¶
func CreateStatus ¶
CreateStatus creates a status from the gantry.
func NamesFromRobot ¶
NamesFromRobot is a helper for getting all gantry names from the given Robot.
func NewLengthsCollector ¶ added in v0.13.0
func NewLengthsCollector(resource interface{}, params data.CollectorParams) (data.Collector, error)
NewLengthsCollector returns a collector to register a lengths method. If one is already registered with the same MethodMetadata it will panic.
func NewPositionCollector ¶ added in v0.13.0
func NewPositionCollector(resource interface{}, params data.CollectorParams) (data.Collector, error)
NewPositionCollector returns a collector to register a position method. If one is already registered with the same MethodMetadata it will panic.
func NewRPCServiceServer ¶ added in v0.2.36
func NewRPCServiceServer(coll resource.APIResourceCollection[Gantry]) interface{}
NewRPCServiceServer constructs an gantry gRPC service server. It is intentionally untyped to prevent use outside of tests.
Types ¶
type Gantry ¶
type Gantry interface { resource.Resource resource.Actuator referenceframe.ModelFramer referenceframe.InputEnabled // Position returns the position in meters Position(ctx context.Context, extra map[string]interface{}) ([]float64, error) // MoveToPosition is in meters // This will block until done or a new operation cancels this one MoveToPosition(ctx context.Context, positionsMm, speedsMmPerSec []float64, extra map[string]interface{}) error // Lengths is the length of gantries in meters Lengths(ctx context.Context, extra map[string]interface{}) ([]float64, error) // Home runs the homing sequence of the gantry and returns true once completed Home(ctx context.Context, extra map[string]interface{}) (bool, error) }
Gantry is used for controlling gantries of N axis.
func FromDependencies ¶
func FromDependencies(deps resource.Dependencies, name string) (Gantry, error)
FromDependencies is a helper for getting the named gantry from a collection of dependencies.
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 register registers all relevant gantries
|
Package register registers all relevant gantries |
Package singleaxis implements a single-axis gantry.
|
Package singleaxis implements a single-axis gantry. |