Robot Configuration

Set Tool Center Point auto_sync

Sets the Tool Center Point (TCP) coordinates relative to the flange coordinate system. Only meaningful in kinematics.

  • Function: set_tcp from the lua module
  • Parameters:
    1. p: [Pose] TCP pose, coordinates relative to the flange coordinate system. Can be Cartesian pose {x, y, z, rz, ry, rx} or joint pose {j1, j2, j3, j4, j5, j6}
  • Returns: [bool] Whether set successfully

Example

set_tcp({0, 0.04, 0, math.pi/2, 0, 0})

Get Current Tool Center Point

Gets the current robot TCP pose.

  • Function: get_tcp from the lua module
  • Parameters: none
  • Returns: [CartesianPose] Current robot TCP pose

Example

print(get_tcp())

Set Velocity Factor auto_sync

Sets the actual velocity as a percentage of the motion command velocity. For example, 100 means 100% of the motion command velocity, 10 means 10%.

  • Function: set_velocity_factor from the lua module
  • Parameters:
    1. factor: [int] Velocity factor percentage, range 0~100
  • Returns: [bool] Whether set successfully

Example

set_velocity_factor(50)

Get Velocity Factor

Gets the current velocity factor.

  • Function: get_velocity_factor from the lua module
  • Parameters: none
  • Returns: [int] Velocity factor percentage, range 0~100

Example

print(get_velocity_factor())

Temporarily Disable Collision Detection auto_sync

Temporarily disables collision detection.

  • Function: disable_collision_detector from the lua module
  • Parameters: none
  • Returns: [bool] Whether executed successfully

Example

disable_collision_detector()

Enable Collision Detection auto_sync

Enables collision detection.

  • Function: enable_collision_detector from the lua module
  • Parameters: none
  • Returns: [bool] Whether executed successfully

Example

enable_collision_detector()

Temporarily Disable Joint Limits auto_sync

Temporarily disables joint limits.

  • Function: disable_joint_limits from the lua module
  • Parameters: none
  • Returns: [bool] Whether executed successfully

Example

disable_joint_limits()

Enable Joint Limits auto_sync

Enables joint limits.

  • Function: enable_joint_limits from the lua module
  • Parameters: none
  • Returns: [bool] Whether executed successfully

Example

enable_joint_limits()

Set Payload auto_sync

Sets the payload mass and center of gravity simultaneously. Must be called when the payload weight or weight distribution changes, for example when the robot picks up or puts down a heavy object.

Can also be set using separate methods Set Payload Mass and Set Payload Center of Gravity.

  • Function: set_payload from the lua module
  • Parameters:
    1. mass: [float] Payload mass in kg
    2. cog: [table] Center of gravity relative to the flange coordinate system, format {x, y, z} (m), e.g. {x=0, y=0, z=0.5}
  • Returns: [bool] Whether set successfully

Example

-- mass: 2kg
-- cog: payload center point coordinates x=0, y=0, z=0.5m (flange coordinate system)
set_payload(2.0, {x=0, y=0, z=0.5})

Set Payload Mass auto_sync

Sets the payload mass.

  • Function: set_payload_mass from the lua module
  • Parameters:
    1. mass: [float] Payload mass in kg
  • Returns: [bool] Whether set successfully

Example

set_payload_mass(2.0)

Set Payload Center of Gravity auto_sync

Sets the payload center of gravity. Must be called when the payload weight distribution changes, for example when the robot picks up or puts down a heavy object.

  • Function: set_payload_cog from the lua module
  • Parameters:
    1. cog: [table] Center of gravity relative to the flange coordinate system, format {x, y, z} (m), e.g. {0, 0, 0.5} or {x=0, y=0, z=0.5}
  • Returns: [bool] Whether set successfully

Example

set_payload_cog({0, 0, 0.5})

Get Payload

Gets the current robot payload mass and center of gravity.

  • Function: get_payload from the lua module
  • Parameters: none
  • Returns: [table] Payload information, format {mass=..., cog={x=..., y=..., z=...}}

Example

print(get_payload())

Output:

{cog={y=0,x=0,z=0},mass=0}

Set Gravity Direction auto_sync

When the robot is fixed, this parameter corresponds to the acceleration direction opposite to the center of the earth.

WARNING

This setting affects the drag teaching experience. Please ensure the setting matches the actual robot installation.

  • Function: set_gravity from the lua module
  • Parameters:
    1. gravity: [table] Gravity direction relative to the robot base frame, format {x, y, z} (m/s²), e.g. {x=0, y=0, z=-9.82}
  • Returns: [bool] Whether set successfully

Example

-- Indicates an acceleration of 9.82 m/s² (1 g) in the negative Z direction (default)
set_gravity({x=0, y=0, z=-9.82})

Get Gravity Direction

Gets the current gravity direction.

  • Function: get_gravity from the lua module
  • Parameters: none
  • Returns: [table] Gravity direction relative to the robot base frame, format {x, y, z} (m/s²)

Example

print(get_gravity())

Output:

{y=0,x=0,z=-9.82}

Set Auto Configuration 3.1.16

WARNING

Takes effect after restart; remains effective long-term after one-time setup.

  • Function: set_auto from the lua module
  • Parameters:
    1. name: [str] Auto configuration item name, currently supports:
      • ARM_POWER: Whether to auto power on after boot, default true
      • ENABLE_JOINT: Whether to auto power on and enable arm after boot, default false
      • INIT_CLAW: Whether to auto initialize gripper after power on, default true
    2. val: [bool] true to enable, false to disable
  • Returns: none

Example

set_auto("INIT_CLAW", false)

Get Auto Configuration 3.1.16

  • Function: get_auto from the lua module
  • Parameters:
    1. name: [str] Auto configuration item name, same as Set Auto Configuration
  • Returns: [bool] Current value of the configuration item, returns nil if not configured

Example

print(get_auto("ARM_POWER"))