Documentation ¶
Overview ¶
Package arm defines the arm that a robot uses to manipulate objects.
Package arm contains a gRPC based arm client.
Package arm contains a gRPC based arm service server.
Index ¶
- Constants
- Variables
- func CreateStatus(ctx context.Context, resource interface{}) (*pb.Status, error)
- func GoToWaypoints(ctx context.Context, a Arm, waypoints [][]referenceframe.Input) error
- func Move(ctx context.Context, r robot.Robot, a Arm, dst *commonpb.Pose, ...) error
- func Named(name string) resource.Name
- func NamesFromRobot(r robot.Robot) []string
- func NewPositionFromMetersAndOV(x, y, z, th, ox, oy, oz float64) *commonpb.Pose
- func NewServer(s subtype.Service) pb.ArmServiceServer
- func Plan(ctx context.Context, r robot.Robot, a Arm, dst *commonpb.Pose, ...) ([][]referenceframe.Input, error)
- func PositionGridDiff(a, b *commonpb.Pose) float64
- func PositionRotationDiff(a, b *commonpb.Pose) float64
- func WrapWithReconfigurable(r interface{}) (resource.Reconfigurable, error)
- type Arm
- type LocalArm
Constants ¶
const (
SubtypeName = resource.SubtypeName("arm")
)
SubtypeName is a constant that identifies the component resource subtype string "arm".
Variables ¶
var ( // ErrStopUnimplemented is used for when Stop() is unimplemented. ErrStopUnimplemented = errors.New("Stop() unimplemented") )
var Subtype = resource.NewSubtype( resource.ResourceNamespaceRDK, resource.ResourceTypeComponent, SubtypeName, )
Subtype is a constant that identifies the component resource subtype.
Functions ¶
func CreateStatus ¶
CreateStatus creates a status from the arm.
func GoToWaypoints ¶
GoToWaypoints will visit in turn each of the joint position waypoints generated by a motion planner.
func Move ¶
func Move(ctx context.Context, r robot.Robot, a Arm, dst *commonpb.Pose, worldState *commonpb.WorldState) error
Move is a helper function to abstract away movement for general arms.
func NamesFromRobot ¶
NamesFromRobot is a helper for getting all arm names from the given Robot.
func NewPositionFromMetersAndOV ¶
NewPositionFromMetersAndOV returns a three-dimensional arm position defined by a point in space in meters and an orientation defined as an OrientationVector. See robot.proto for a math explanation.
func NewServer ¶
func NewServer(s subtype.Service) pb.ArmServiceServer
NewServer constructs an arm gRPC service server.
func Plan ¶
func Plan( ctx context.Context, r robot.Robot, a Arm, dst *commonpb.Pose, worldState *commonpb.WorldState, ) ([][]referenceframe.Input, error)
Plan is a helper function to be called by arm implementations to abstract away the default procedure for using the motion planning library with arms.
func PositionGridDiff ¶
PositionGridDiff returns the euclidean distance between two arm positions in millimeters.
func PositionRotationDiff ¶
PositionRotationDiff returns the sum of the squared differences between the angle axis components of two positions.
func WrapWithReconfigurable ¶
func WrapWithReconfigurable(r interface{}) (resource.Reconfigurable, error)
WrapWithReconfigurable converts a regular Arm implementation to a reconfigurableArm and a localArm into a reconfigurableLocalArm If arm is already a Reconfigurable, then nothing is done.
Types ¶
type Arm ¶
type Arm interface { // GetEndPosition returns the current position of the arm. GetEndPosition(ctx context.Context, extra map[string]interface{}) (*commonpb.Pose, error) // MoveToPosition moves the arm to the given absolute position. // 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, pose *commonpb.Pose, worldState *commonpb.WorldState, extra map[string]interface{}) error // MoveToJointPositions moves the arm's joints to the given positions. // This will block until done or a new operation cancels this one MoveToJointPositions(ctx context.Context, positionDegs *pb.JointPositions, extra map[string]interface{}) error // GetJointPositions returns the current joint positions of the arm. GetJointPositions(ctx context.Context, extra map[string]interface{}) (*pb.JointPositions, error) // Stop stops the arm. It is assumed the arm stops immediately. Stop(ctx context.Context, extra map[string]interface{}) error generic.Generic referenceframe.ModelFramer referenceframe.InputEnabled }
An Arm represents a physical robotic arm that exists in three-dimensional space.
func FromDependencies ¶
func FromDependencies(deps registry.Dependencies, name string) (Arm, error)
FromDependencies is a helper for getting the named arm from a collection of dependencies.
func NewClientFromConn ¶
func NewClientFromConn(ctx context.Context, conn rpc.ClientConn, name string, logger golog.Logger) Arm
NewClientFromConn constructs a new Client from connection passed in.
type LocalArm ¶
type LocalArm interface { Arm resource.MovingCheckable }
A LocalArm represents an Arm that can report whether it is moving or not.
Directories ¶
Path | Synopsis |
---|---|
Package eva implements the Eva robot from Automata.
|
Package eva implements the Eva robot from Automata. |
Package fake implements a fake arm.
|
Package fake implements a fake arm. |
Package register registers all relevant arms
|
Package register registers all relevant arms |
Package trossen implements arms from Trossen Robotics.
|
Package trossen implements arms from Trossen Robotics. |
Package universalrobots implements the UR arm from Universal Robots.
|
Package universalrobots implements the UR arm from Universal Robots. |
Package varm implements versions of the Viam arm.
|
Package varm implements versions of the Viam arm. |
Package wrapper is a package that defines an implementation that wraps a partially implemented arm
|
Package wrapper is a package that defines an implementation that wraps a partially implemented arm |
Package xarm implements some xArms.
|
Package xarm implements some xArms. |
Package yahboom implements a yahboom based robot.
|
Package yahboom implements a yahboom based robot. |