Robot Configuration
Set Tool Center Point auto_sync
Set the Tool Center Point (TCP) coordinates, relative to the flange 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):
x: X-direction offset, unit: m.y: Y-direction offset, unit: m.z: Z-direction offset, unit: m.α: Rotation angle around Z-axis, unit: rad.β: Rotation angle around Y-axis, unit: rad.γ: 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()
- Returns
- Current robot TCP. The type is the same as the input parameter of Set Tool Center Point.
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 flange coordinate system.xX-direction offset of the center of gravity (m)yY-direction offset of the center of gravity (m)zZ-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 flange 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
xX-direction offset of the center of gravity (m)yY-direction offset of the center of gravity (m)zZ-direction offset of the center of gravity (m)
Example Program
- cog: Load center point coordinates: x: 0, y: 0, z: 0.5m (in the flange 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
xX-direction component (m/s2)yY-direction component (m/s2)zZ-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
xX-direction component (m/s2)yY-direction component (m/s2)zZ-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 itemsARM_POWERWhether to automatically power on after startup, defaulttrueENABLE_JOINTWhether to automatically power on and start the arm after startup, defaultfalseINIT_CLAWWhether to automatically initialize the gripper after power on, defaulttrue
val: true to enable, false to disable
Example Program
set_auto("INIT_CLAW", false)
Get Auto Configuration Item 3.1.16
get_auto(name)
