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_tcpfrom the lua module - Parameters:
- 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}
- p: [Pose] TCP pose, coordinates relative to the flange coordinate system. Can be Cartesian pose
- 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_tcpfrom 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_factorfrom the lua module - Parameters:
- 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_factorfrom 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_detectorfrom 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_detectorfrom 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_limitsfrom 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_limitsfrom 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_payloadfrom the lua module - Parameters:
- mass: [float] Payload mass in kg
- 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_massfrom the lua module - Parameters:
- 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_cogfrom the lua module - Parameters:
- 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}
- cog: [table] Center of gravity relative to the flange coordinate system, format
- 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_payloadfrom 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_gravityfrom the lua module - Parameters:
- 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}
- gravity: [table] Gravity direction relative to the robot base frame, format
- 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_gravityfrom 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_autofrom the lua module - Parameters:
- name: [str] Auto configuration item name, currently supports:
ARM_POWER: Whether to auto power on after boot, defaulttrueENABLE_JOINT: Whether to auto power on and enable arm after boot, defaultfalseINIT_CLAW: Whether to auto initialize gripper after power on, defaulttrue
- val: [bool]
trueto enable,falseto disable
- name: [str] Auto configuration item name, currently supports:
- Returns: none
Example
set_auto("INIT_CLAW", false)
Get Auto Configuration 3.1.16
- Function:
get_autofrom the lua module - Parameters:
- name: [str] Auto configuration item name, same as Set Auto Configuration
- Returns: [bool] Current value of the configuration item, returns
nilif not configured
Example
print(get_auto("ARM_POWER"))
