Documentation ¶
Overview ¶
Package posetracker contains the interface and gRPC infrastructure for a pose tracker component
Index ¶
- Constants
- Variables
- func Named(name string) resource.Name
- func NewResourceIsNotPoseTracker(resourceName string) error
- func NewServer(service subtype.Service) pb.PoseTrackerServiceServer
- func NewUnimplementedInterfaceError(actual interface{}) error
- func Readings(ctx context.Context, poseTracker PoseTracker) (map[string]interface{}, error)
- func WrapWithReconfigurable(r interface{}, name resource.Name) (resource.Reconfigurable, error)
- type BodyToPoseInFrame
- type PoseTracker
Constants ¶
const SubtypeName = resource.SubtypeName("pose_tracker")
SubtypeName is a constant that identifies the component resource subtype string "posetracker".
Variables ¶
var Subtype = resource.NewSubtype( resource.ResourceNamespaceRDK, resource.ResourceTypeComponent, SubtypeName, )
Subtype is a constant that identifies the component resource subtype.
Functions ¶
func NewResourceIsNotPoseTracker ¶
NewResourceIsNotPoseTracker returns an error for when a resource does not properly implement the PoseTracker interface.
func NewServer ¶
func NewServer(service subtype.Service) pb.PoseTrackerServiceServer
NewServer constructs a pose tracker gRPC service server.
func NewUnimplementedInterfaceError ¶
func NewUnimplementedInterfaceError(actual interface{}) error
NewUnimplementedInterfaceError is used when there is a failed interface check.
func Readings ¶
func Readings(ctx context.Context, poseTracker PoseTracker) (map[string]interface{}, error)
Readings is a helper for getting all readings from a PoseTracker.
func WrapWithReconfigurable ¶
func WrapWithReconfigurable(r interface{}, name resource.Name) (resource.Reconfigurable, error)
WrapWithReconfigurable converts a regular PoseTracker implementation to a reconfigurablePoseTracker. If pose tracker is already a reconfigurablePoseTracker, then nothing is done.
Types ¶
type BodyToPoseInFrame ¶
type BodyToPoseInFrame map[string]*referenceframe.PoseInFrame
BodyToPoseInFrame represents a map of body names to PoseInFrames.
type PoseTracker ¶
type PoseTracker interface { Poses(ctx context.Context, bodyNames []string, extra map[string]interface{}) (BodyToPoseInFrame, error) sensor.Sensor generic.Generic }
A PoseTracker represents a robot component that can observe bodies in an environment and provide their respective poses in space. These poses are given in the context of the PoseTracker's frame of reference.
func FromRobot ¶
func FromRobot(r robot.Robot, name string) (PoseTracker, error)
FromRobot is a helper for getting the named force matrix sensor from the given Robot.
func NewClientFromConn ¶
func NewClientFromConn(ctx context.Context, conn rpc.ClientConn, name string, logger golog.Logger) PoseTracker
NewClientFromConn constructs a new Client from connection passed in.