Gripper

Gripper commands require installing an LMG-90open in new window gripper on the robot flange. This gripper supports force control and position control.

Note

When the robot starts for the first time or is powered on again, the gripper will automatically open and close once to confirm its travel range. Please ensure there are no obstacles around the gripper before starting the robot.

Configure Throw Gripper Error

By default, the gripper continues running after an error. After configuring to throw gripper errors, a Lua error will be thrown.

  • Function: throw_claw_error from the lua module
  • Parameters:
    1. throw: [bool] Whether to throw gripper error. Optional, default true
  • Returns: none

Example

throw_claw_error(true)

Initialize Gripper auto_sync

Initializes the gripper, opening and closing once to confirm its travel range. Requires new version gripper hardware support.

  • Function: init_claw from the lua module
  • Parameters:
    1. must: [bool] Whether to force initialization. Optional, default false, initializes only once. If the gripper has already been initialized, it will not be forced to initialize; select true to force the gripper to initialize
  • Returns: [bool] Whether executed successfully

Example

init_claw()

Set Gripper auto_sync

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

  • Function: set_claw from the lua module
  • Parameters:
    1. force: [float] Force (0-100)
    2. amplitude: [float] Opening amplitude (0-100)
  • Returns: [bool] Whether executed successfully

Example

-- Close gripper to minimum with half force
set_claw(50, 0)

Set Gripper Parameters auto_sync

Sets gripper amplitude or force separately by type.

  • Function: set_claw_aio from the lua module
  • Parameters:
    1. type: [str] Gripper parameter:
      • "Amplitude": Opening amplitude (0-100)
      • "Force": Force (0-100)
      • "Weight": Weight
    2. value: [float] Value to set
  • Returns: [bool] Whether executed successfully

Example

-- Set gripper to open to maximum
set_claw_aio("Amplitude", 100)

Get Gripper Parameters

Gets gripper current amplitude or force separately by type.

  • Function: get_claw_aio from the lua module
  • Parameters:
    1. type: [str] Gripper parameter, same as Set Gripper Parameters
  • Returns: [float] Current value of the corresponding type

Example

print(get_claw_aio("Amplitude"))

Wait Gripper Parameters auto_sync

Compares gripper current amplitude or force value until the given condition is met.

  • Function: wait_claw_aio from the lua module
  • Parameters:
    1. type: [str] Gripper parameter, same as Set Gripper Parameters
    2. value: [float] Value to compare
    3. relation: [str] Relational Operator
  • Returns: [bool] Whether condition is met

Example

-- Wait until gripper opens to half
wait_claw_aio("Amplitude", 50, ">")