Robot Configuration

Set Tool Center Point auto_sync

Set the Tool Center Point (TCP) coordinates, relative to the tool coordinate system. This is only meaningful in kinematics.

set_tcp({x, y, z, α, β, γ})
  • The parameter is a six-tuple representing a spatial position transformation, in the following order (note that Lua array indices start at 1):
    1. x: X-direction offset, unit: m.
    2. y: Y-direction offset, unit: m.
    3. z: Z-direction offset, unit: m.
    4. α: Rotation angle around Z-axis, unit: rad.
    5. β: Rotation angle around Y-axis, unit: rad.
    6. γ: Rotation angle around X-axis, unit: rad.
Example Program
set_tcp({0, 0.04, 0, math.pi/2, 0, 0})

Get Current Tool Center Point

get_tcp()

Set Velocity Factor auto_sync

set_velocity_factor(factor)

Set the actual speed as a percentage of the speed in the arm movement command. For example, 100 means 100% of the command speed, 10 means 10% of the command speed.

  • Parameters
    • factor: Velocity factor percentage, range 0~100
Example Program
set_velocity_factor(50)

Get Velocity Factor

get_velocity_factor()
  • Returns
    • Velocity factor percentage, range 0~100

Temporarily Disable Collision Detection auto_sync

disable_collision_detector()

Enable Collision Detection auto_sync

enable_collision_detector()

Temporarily Disable Joint Limits auto_sync

disable_joint_limits()

Enable Joint Limits auto_sync

enable_joint_limits()

Set End Load auto_sync

set_payload(mass, cog)

Set both the end load mass and center of gravity simultaneously. Alternatively, you can use separate methods Set Load Mass and Set Load Center of Gravity to set them.

This method must be called to update when the load weight or weight distribution changes. For example, when the robot picks up or puts down a relatively heavy object.

  • Parameters
    • mass: Load mass, unit: kg.
    • cog: Center of gravity, relative to the tool coordinate system.
      1. x X-direction offset of the center of gravity (m)
      2. y Y-direction offset of the center of gravity (m)
      3. z Z-direction offset of the center of gravity (m)
Example Program
  • mass: 2kg
  • cog: Load center point coordinates: x: 0, y: 0, z: 0.5m (in the tool coordinate system)
set_payload(2.0, {x=0, y=0, z=0.5})

Set Load Mass auto_sync

set_payload_mass(mass)
  • Parameters
    • mass: Load mass, unit: kg.
Example Program
set_payload_mass(2.0)

Set Load Center of Gravity auto_sync

set_payload_cog({x, y, z})

This method must be called to update when the load weight distribution changes. For example, when the robot picks up or puts down a relatively heavy object.

  • Parameters
    1. x X-direction offset of the center of gravity (m)
    2. y Y-direction offset of the center of gravity (m)
    3. z Z-direction offset of the center of gravity (m)
Example Program
  • cog: Load center point coordinates: x: 0, y: 0, z: 0.5m (in the tool coordinate system)
set_payload_cog({0, 0, 0.5})

Or written as:

set_payload_cog({x=0, y=0, z=0.5})

Get End Load

get_payload()

Get the current mass and center of gravity of the robot's end load.

  • Returns the current robot load.
    • mass: Current robot load mass.
    • cog: Current robot load center of gravity table.
Example Program
print(get_payload())

Output:

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

Set Gravity Acceleration Direction auto_sync

set_gravity({x, y, z})

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

WARNING

This setting will affect the drag teaching experience. Please make sure the setting is consistent with the actual installation of the robot.

  • Parameters are the gravity direction described relative to the robot's base coordinate system
    1. x X-direction component (m/s2)
    2. y Y-direction component (m/s2)
    3. z Z-direction component (m/s2)
Example Program
  • Indicates an acceleration of 9.82 m/s2 (1 g) in the negative Z-axis direction (default)
set_gravity({x=0, y=0, z=-9.82})

Get Gravity Acceleration Direction

get_gravity()
  • Returns the gravity direction described relative to the robot's base coordinate system
    1. x X-direction component (m/s2)
    2. y Y-direction component (m/s2)
    3. z Z-direction component (m/s2)
Example Program
print(get_gravity())

Output:

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

Set Auto Configuration Item 3.1.16

set_auto(name, val)

WARNING

It effect after restart; Once set, it will effect for a long time;

  • Parameters
    • name: Auto configuration item name, currently supports the following configuration items
      1. ARM_POWER Whether to automatically power on after startup, default true
      2. ENABLE_JOINT Whether to automatically power on and start the arm after startup, default false
      3. INIT_CLAW Whether to automatically initialize the gripper after power on, default true
    • val: true to enable, false to disable
Example Program
set_auto("INIT_CLAW", false)

Get Auto Configuration Item 3.1.16

get_auto(name)