This robotiq module implements a robotiq 2f-grippers gripper, using the rdk:component:gripper API.
Note
Before configuring your gripper, you must create a machine.
Navigate to the CONFIGURE tab of your machine in the Viam app. Add gripper / robotiq:2f-grippers to your machine.
Copy and paste the following attributes into your JSON configuration:
{
"host": "<your-gripper-ip-address>"
}The following attributes are available for viam:robotiq:2f-grippers grippers:
| Attribute | Type | Required? | Description |
|---|---|---|---|
host |
string | Required | The host address of your gripper machine. |
{
"name": "<your-robotiq-2f-grippers-name>",
"model": "viam:robotiq:2f-grippers",
"type": "gripper",
"namespace": "rdk",
"attributes": {
"host": "0.0.0.0"
},
"depends_on": []
}Raw position control. Robotiq units: 0 = fully open, 255 = fully closed (bounded by the calibrated open/close limits detected at startup).
// Get the current position
resp, err := gripperComponent.DoCommand(context.Background(), map[string]interface{}{"get": true})
// resp["pos"] contains the position
// Move to a specific position
resp, err := gripperComponent.DoCommand(context.Background(), map[string]interface{}{"set": 128.0})
// resp["position"] contains the commanded position- To test your gripper, expand the TEST section of its configuration pane or go to the CONTROL tab.
- To write code against your gripper, use one of the available SDKs.
- To view examples using a gripper component, explore these tutorials.