Documentation ¶
Overview ¶
Package gripper contains a gRPC based gripper client.
Package gripper defines a robotic gripper. For more information, see the gripper component docs.
Package gripper contains a gRPC based gripper service server.
Index ¶
Constants ¶
const SubtypeName = "gripper"
SubtypeName is a constant that identifies the component resource API string.
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 gripper.
func NamesFromRobot ¶
NamesFromRobot is a helper for getting all gripper names from the given Robot.
func NewRPCServiceServer ¶ added in v0.2.36
func NewRPCServiceServer(coll resource.APIResourceCollection[Gripper]) interface{}
NewRPCServiceServer constructs an gripper gRPC service server. It is intentionally untyped to prevent use outside of tests.
Types ¶
type Gripper ¶
type Gripper interface { resource.Resource resource.Shaped resource.Actuator referenceframe.ModelFramer // Open opens the gripper. // This will block until done or a new operation cancels this one. Open(ctx context.Context, extra map[string]interface{}) error // Grab makes the gripper grab. // returns true if we grabbed something. // This will block until done or a new operation cancels this one. Grab(ctx context.Context, extra map[string]interface{}) (bool, error) }
A Gripper represents a physical robotic gripper. For more information, see the gripper component docs.
Open example:
myGripper, err := gripper.FromRobot(machine, "my_gripper") // Open the gripper. err := myGripper.Open(context.Background(), nil)
Grab example:
myGripper, err := gripper.FromRobot(machine, "my_gripper") // Grab with the gripper. grabbed, err := myGripper.Grab(context.Background(), nil)