Gripper
The gripper commands require installing the LMG-90 model gripper on the robot flange plate. This gripper supports both force control and position control.
Note
When the robot first starts up or is powered on again, the gripper will automatically open and close once to confirm the stroke. Please check if there are any obstacles around the gripper before starting the robot.
Initialize Gripper
Initialize the gripper, the gripper opens and closes once to confirm the stroke. Requires new version gripper hardware support
lebai:init_claw(must)
- Parameters
must
. Whether to force initialization. Optional, by default only initializes once, does not force initialization
Set Gripper
lebai:set_claw(force, amplitude)
Set gripper force (force control) and amplitude (position control). If an object is gripped during closing, it will not continue to close to avoid damaging the object. The criterion is the force value set here.
- Parameters
force
. Force (0-100). Optional, default unchangedamplitude
. Opening amplitude (0-100). Optional, default unchanged
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "set_claw", "params": [{"force": 0, "amplitude": 0}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
Get Gripper Status
claw = lebai:get_claw()
- Returns
force
. Force (0-100)amplitude
. Opening amplitude (0-100)
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "get_claw", "params": [{}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {"force": 0, "amplitude": 0, "hold_on": true}, "id": 1 }