Claw

Claw commands require the LMG-90open in new window gripper to be installed on the robot flange. This gripper supports force control and position control.

Note

When the robot is first started or re-powered, the gripper will automatically open and close once to confirm its stroke. Please check for obstacles around the gripper before starting the robot.

Initialize Gripper

Initialize the gripper. The gripper opens and closes once to confirm its stroke. Requires new hardware version gripper support.

  • Function name: Method init_claw under [Robot]
  • Parameters:
    1. force: [bool] Whether to force initialization. Optional, default False. When False, if the gripper has been initialized before, it will not initialize again; if not, it will initialize once
  • Return: None

WARNING

After the arm emergency stops and re-powers, the gripper will automatically open and close once to confirm its stroke. If obstacles around the gripper cause the stroke confirmation to be inaccurate, you can force initialization once at an appropriate position.

Example Program

lebai:init_claw(true)

Set Gripper

Set gripper force (force control) and amplitude (position control). If an object is grasped during closing, it will stop closing to avoid crushing the object. The criterion is the force value set here.

  • Function name: Method set_claw under [Robot]
  • Parameters:
    1. force: [float] Force (0-100). Optional, default no change
    2. amplitude: [float] Opening amplitude (0-100). Optional, default no change
  • Return: None
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "set_claw", "params": [{"force": 0, "amplitude": 0}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }

Example Program

lebai:set_claw(100, 30)

Get Gripper Status

  • Function name: Method get_claw under [Robot]
  • Parameters: None
  • Return: [Claw] Current gripper status
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 }

Example Program

claw = lebai:get_claw()