Skip to main content

Methods

1 Robot Basic Operation and Information Query

connectToRobot() [1/2]

def connectToRobot(self, ec: dict) -> None:

Establish connection with the robot. The robot address is passed when creating the robot instance

  • Parameter: [out] ec: Error code

connectToRobot() [1/2]

def connectToRobot(self, remoteIP: str, localIP: str = '') -> None:

Connect to robot

  • Parameters:
    • remoteIP Robot IP address
    • localIP Local address. Used for real-time mode data transmission, can be left unset; not supported for PCB3 /4 axis models

disconnectFromRobot()

def disconnectFromRobot(self, ec: dict) -> None:

Disconnect from the robot. The robot motion will be stopped before disconnection, please pay attention to safety

  • Parameter: [out] ec: Error code

robotInfo()

def robotInfo(self, ec: dict) -> Info:

Query robot basic information

  • Parameter: [out] ec: Error code
  • Return: Robot basic information (controller version, model, number of axes)

powerState()

def powerState(self, ec: dict) -> PowerState:

Robot power on/off and E-stop state

  • Parameter: [out] ec: Error code
  • Return:
    • on - Power on
    • off - Power off
    • estop - Emergency stop
    • gstop - Safety door open

setPowerState()

def setPowerState(self, on: bool, ec: dict) -> None:

Robot power on/off. Note: Only robots without external enable switch or teach pendant can be powered on in manual mode.

  • Parameters:
    • [in] on: true- Power on | false- Power off
    • [out] ec: Error code

operateMode()

def operateMode(self, ec: dict) -> OperateMode:

Query current robot operation mode

  • Parameter: [out] ec: Error code
  • Return: Manual | Automatic

setOperateMode()

def setOperateMode(self, mode: OperateMode, ec: dict) -> None:

Switch manual/automatic mode

  • Parameters:
    • [in] mode: manual - Manual / automatic - Automatic
    • [out] ec: Error code

operationState()

def operationState(self, ec: dict) -> OperationState:

Query current robot running status (idle, moving, drag enabled, etc.)

  • Parameter: [out] ec: Error code
  • Return: Operation state enum

posture()

def posture(self, ct: CoordinateType, ec: dict) -> [list[float]]:

Get current posture of robot flange or end

  • Parameters:
    • [in] ct Coordinate system type
      • flangeInBase: Flange relative to base frame;
      • endInRef: End relative to external reference frame. For example, when handheld tool and external workpiece are set, this coordinate system type returns the coordinates of the tool relative to the workpiece coordinate system.
    • [out] ec: Error code
  • Return: double array, [X, Y, Z, Rx, Ry, Rz], where translation unit is meter and rotation unit is radian

cartPosture()

def cartPosture(self, ct: CoordinateType, ec: dict) -> CartesianPosition:

Get current posture of robot flange or end

  • Parameters:
    • [in] ct Coordinate system type
    • [out] ec: Error code
  • Return: Current Cartesian position

jointPos()

def jointPos(self, ec: dict) -> list[float]:

Current robot axis angles, robot body + external axes, unit: radian, external axis rail, unit meter

  • Parameter: [out] ec: Error code
  • Return: Joint angle values and external axis values

jointVel()

def jointVel(self, ec: dict) -> list[float]:

Current robot joint velocity, robot body + external axes, unit: radian/second, external axis unit meter/second

  • Parameter: [out] ec: Error code
  • Return: Joint velocity

jointTorque()

def jointTorque(self, ec: dict) -> list[float]:

Joint force sensor values, unit: Nm

  • Parameter: [out] ec: Error code
  • Return: Torque values

baseFrame()

def baseFrame(self, ec: dict) -> list[float]:

User-defined base coordinate system, relative to world coordinate system

  • Parameter: [out] ec: Error code
  • Return: double array, [X, Y, Z, Rx, Ry, Rz], where translation unit is meter and rotation unit is radian

setBaseFrame()

def setBaseFrame(self, frame: Frame, ec: dict) -> None:

Set base coordinate system, only save values after setting, takes effect after restarting controller

  • Parameters:
    • [in] frame Coordinate system, default uses custom installation method
    • [out] ec: Error code

toolset()

def toolset(self, ec: dict) -> Toolset:

Query current tool workpiece set information

Note: This tool workpiece set is only used for SDK motion control, not related to RL projects

  • Parameter: [out] ec: Error code
  • Return: See Toolset data structure

setToolset() [1/3]

def setToolset(self, toolset: Toolset, ec: dict) -> None:

Set tool workpiece set information

Note: This tool workpiece set is only used for SDK motion control, not related to RL projects. After setting, "toolx", "wobjx" will be displayed in the upper right corner of RobotAssist, and the end coordinates displayed in status monitoring will also change. In addition to this interface, if the default tool workpiece is changed through RobotAssist (the option in the upper right corner), this tool workpiece set will also be changed accordingly.

  • Parameters:
    • [in] toolset Tool workpiece set information
    • [out] ec: Error code

setToolset() [2/3]

def setToolset(self, toolName: str, wobjName: str, ec: dict) -> Toolset:

Use created tool and workpiece to set tool workpiece set information

Note: Setting premise: A RL project has been loaded, and tools and workpieces have been created. Otherwise, only the default tool workpiece can be set, namely "tool0" and "wobj0". A set of tool workpiece cannot be handheld or external at the same time; if there is a conflict, the tool's position shall prevail, for example, if the tool workpiece is handheld at the same time, no error will be returned, but the workpiece's coordinate system becomes external

  • Parameters:
    • [in] toolName Tool name
    • [in] wobjName Workpiece name
    • [out] ec: Error code

setToolset() [3/3]

def setToolset(self, toolName: str, wobjName: str, ec: dict) -> None:

Use created tool and workpiece to set tool workpiece set information

  • Note Setting premise:
    1. Using tools and workpieces created in RL project: Need to load the corresponding RL project first;
    2. Global tools and workpieces: No need to load project, can be called directly. e.g. setToolset("g_tool_0", "g_wobj_0") A set of tool workpiece cannot be handheld or external at the same time; if there is a conflict, the tool's position shall prevail, for example, if the tool workpiece is handheld at the same time, no error will be returned, but the workpiece's coordinate system becomes external
  • Parameters:
    • [in] toolName Tool name
    • [in] wobjName Workpiece name
    • [out] ec: Error code

calcIk() [1/2]

def calcIk(self, posture: CartesianPosition, ec: dict) -> typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]:

Calculate inverse kinematics based on posture

  • Parameters:
    • [in] posture Robot end posture, relative to external reference frame
    • [out] ec: Error code
  • Return: Axis angles, unit: radian

calcIk() [2/2]

def calcIk(self, posture: CartesianPosition, toolset: Toolset, ec: dict) -> typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]:

Calculate inverse kinematics in given tool workpiece coordinate system based on posture

  • Parameters:
    • [in] posture Robot end posture, relative to external reference frame
    • [in] toolset Tool workpiece set information
    • [out] ec: Error code
  • Return: Axis angles, unit: radian

calcFk() [1/2]

def calcFk(self, joints: typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)], ec: dict) -> CartesianPosition:

Calculate forward kinematics based on axis angles

  • Parameters:
    • [in] joints Axis angles, unit: radian
    • [out] ec: Error code
  • Return: Robot end posture, relative to external reference frame

calcFk() [2/2]

def calcFk(self, joints: typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)], toolset: Toolset, ec: dict) -> CartesianPosition:

Calculate forward kinematics in given tool workpiece coordinate system based on axis angles

  • Parameters:
    • [in] joints Axis angles, unit: radian
    • [in] toolset Tool workpiece set information
    • [out] ec: Error code
  • Return: Robot end posture, relative to external reference frame

calibrateFrame ()

def calibrateFrame(self, type: FrameType, points: list[list[float]], is_held: bool, ec: dict, base_aux: typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)] = [0.0, 0.0, 0.0]) -> FrameCalibrationResult:

Coordinate system calibration (N-point calibration)

  • Note Calibration methods and precautions for each coordinate system type:
    1. Tool coordinate system: Three-point/four-point/six-point calibration method
    2. Workpiece coordinate system: Three-point calibration. The calibration result will not be transformed relative to the user coordinate system, that is, if it is an external workpiece, the returned result is relative to the base coordinate system.
    3. Base coordinate system: Six-point calibration. Please ensure that dynamic constraints and feedforward are turned off before calibration. If calibration is successful (no error code), the controller will automatically save the calibration result, which takes effect after restarting the controller.
    4. Rail base coordinate system: Three-point calibration. If calibration is successful (no error code), the controller will automatically save the calibration result, which takes effect after restarting the controller.
  • Parameters:
    • [in] points Axis angle list, the length of the list is N. For example, using three-point method to calibrate tool coordinate system, 3 sets of axis angles should be passed in. The unit of axis angles is radian.
    • [in] is_held true - Robot handheld | false - External. Only affects tool/workpiece calibration
    • [in] base_aux Auxiliary point used for base coordinate system calibration, unit [meter]
    • [out] ec: Error code
  • Return: Calibration result, when no error code is set, the calibration result is valid

clearServoAlarm()

def clearServoAlarm(self, ec: dict) -> None:

Clear servo alarm

  • Parameter: [out] ec: Error code, error code is set to -1 when there is a servo alarm and clearing fails

enableCollisionDetection()

def enableCollisionDetection(self, sensitivity: list[float], behaviour: StopLevel, fallback_compliance: float, ec: dict) -> None:

Set collision detection related parameters, turn on collision detection function

  • Parameters:
    • [in] sensitivity Collision detection sensitivity, range 0.01-2.0
    • [in] behaviour Post-collision robot behavior, supports stop1 (safe stop, stop0 and stop1 have the same processing method) and stop2 (trigger pause), suppleStop (compliant stop)
    • [in] fallback_compliance
      1. When the post-collision behavior is safe stop or trigger pause, this parameter means the fallback distance after collision, unit: meter
      2. When the post-collision behavior is compliant stop, this parameter means compliance, range [0.0, 1.0]
    • [out] ec: Error code

disableCollisionDetection()

def disableCollisionDetection(self, ec: dict) -> None:

Turn off collision detection function

  • Parameter: [out] ec: Error code

getSoftLimit()

def getSoftLimit(self, limits: PyTypeVectorArrayDouble2, ec: dict) -> bool:

Get current soft limit values

  • Parameters:
    • [out] limits Soft limit for each axis [lower limit, upper limit], unit: radian
    • [out] ec: Error code
  • Return: true - Enabled | false - Disabled

setSoftLimit()

def setSoftLimit(self, enable: bool, ec: dict, limits: list[list[float]]) -> None:

Set soft limit. Soft limit setting requirements:

  1. When turning on soft limit, the manipulator should be powered off and in manual mode;
  2. Soft limit cannot exceed mechanical hard limit
  3. The current axis angles of the manipulator should be within the set limit range
  • Parameters:
    • [in] enable true - Enable | false - Disable.
    • [out] ec: Error code
    • [in] limits Each axis [lower limit, upper limit], unit: radian.
      1. When limits is the default value, it is considered to only turn on soft limit without modifying the value; when it is not the default value, modify the soft limit first and then turn it on
      2. When turning off soft limit, the limit value will not be modified

queryControllerLog()

def queryControllerLog(self, count: int, level: set[LogInfoLevel], ec: dict) -> list[LogInfo]:

Query the latest logs of the controller

  • Parameters:
    • [in] count Number of queries, maximum is 10
    • [in] level Specify log level, empty set means no specification
    • [out] ec: Error code
  • Return: Log information

recoverState()

def recoverState(self, item: int, ec: dict) -> None:

Recover robot state according to option

  • Parameters:
    • [in] item Recovery option, 1: Emergency stop recovery
    • [out] ec: Error code

setRailParameter()

def setRailParameter(self, name: str, value: list[float], ec: dict) -> None:

Set rail parameters

  • Template parameters: Parameter type
  • Parameters:
    • [in] name: Parameter name, see value description
    • [in] value:
      ParameterParameter nameData type
      Switchenablebool
      Base coordinate systembaseFrameFrame
      Rail namenamestr
      Encoder resolutionencoderResolutionint
      Reduction ratioreductionRatiodouble
      Motor maximum speed(rpm)motorSpeedint
      Soft limit(m), [lower limit, upper limit]softLimitlist[float]
      Motion range(m), [lower limit, upper limit]rangelist[float]
      Maximum speed(m/s)maxSpeeddouble
      Maximum acceleration(m/s^2)maxAccdouble
      Maximum jerk(m/s^3)maxJerkdouble

getRailParameter()

def getRailParameter(self, name: str, value: PyTypeDouble, ec: dict) -> None:

Read rail parameters

  • Template parameters: Parameter type
  • Parameters:
    • [in] name Parameter name, see setRailParameter()
    • [out] value Parameter value, see setRailParameter()
    • [out] ec: Error code, error code returned if parameter name does not exist or data type does not match

configNtp()

def configNtp(self, server_ip: str, ec: dict) -> None:

Configure NTP. Non-standard function, needs additional installation

  • Parameters:
    • [in] server_ip NTP server IP
    • [out] ec: Error code, NTP not installed correctly, or IP address format error

syncTimeWithServer()

def syncTimeWithServer(self, ec: dict) -> None:

Manually sync time once, the remote IP is configured through configNtp. It takes a few seconds, blocks waiting for sync completion, the interface preset timeout is 12 seconds

  • Parameter: [out] ec: Error code. NTP service not installed correctly, or cannot sync with server

sdkVersion()

def sdkVersion() -> str:

Query xCore-SDK version

  • Return: Version number

2 Motion Control (Non-real-time Mode)

setMotionControlMode()

def setMotionControlMode(self, mode: MotionControlMode, ec: dict) -> None:

Set motion control mode

  • Note: Before calling each motion control interface, the corresponding control mode must be set.
  • Parameters:
    • [in] mode: Mode
    • [out] ec: Error code

moveReset()

def moveReset(self, ec: dict) -> None:

Motion reset, clear sent motion commands, clear execution information

  • Note: Robot class calls motion reset once during initialization. When switching control between RL program and SDK motion commands, motion reset is needed.
  • Parameter: [out] ec Error code

stop()

def stop(self, ec: dict) -> None:

Pause robot motion; can call moveStart() to continue motion after pausing. If you need to completely stop and no longer execute added commands, you can call moveReset()

  • Note: Currently supports stop2 stop type, planned stop without power off, see StopLevel. After calling this interface, after pausing, you can call moveStart() to continue motion. If you need to completely stop and no longer execute added commands, you can call moveReset()
  • Parameter: [out] ec: Error code

moveStart()

def moveStart(self, ec: dict) -> None:

Start/continue motion

  • Parameter: [out] ec: Error code

moveAppend() [1/2]

def moveAppend(self, cmds: list[MoveJCommand], cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmds: list[MoveAbsJCommand], cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmds: list[MoveLCommand], cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmds: list[MoveCCommand], cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmds: list[MoveCFCommand], cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmds: list[MoveSPCommand], cmdID: PyString, ec: dict) -> None:

Add single or multiple motion commands, call moveStart() to start motion after adding

  • Parameters
    • [in] cmds Command list, allowed number is 1-100, must be the same type of command
    • [out] cmdID ID of this command, can be used to query command execution information
    • [out] ec Error code, only feedbacks errors before command sending, including: 1) Network connection problem; 2) Command number does not match;

moveAppend() [2/2]

def moveAppend(self, cmd: MoveAbsJCommand, cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmd: MoveAbsJCommand, cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmd: MoveLCommand, cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmd: MoveJCommand, cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmd: MoveCFCommand, cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmd: MoveCCommand, cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmd: MoveSPCommand, cmdID: PyString, ec: dict) -> None:
def moveAppend(self, cmd: MoveWaitCommand, cmdID: PyString, ec: dict) -> None:

Add single motion command, call moveStart() to start motion after adding

  • Parameters:
    • [in] cmds Command
    • [out] cmdID ID of this command, can be used to query command execution information
    • [out] ec Error code, only feedbacks errors before command sending, including: 1) Network connection problem; 2) Command number does not match;

executeCommand()

def executeCommand(self, cmds: list[MoveAbsJCommand], ec: dict) -> None:
def executeCommand(self, cmds: list[MoveLCommand], ec: dict) -> None:
def executeCommand(self, cmds: list[MoveJCommand], ec: dict) -> None:
def executeCommand(self, cmds: list[MoveCCommand], ec: dict) -> None:
def executeCommand(self, cmds: list[MoveCFCommand], ec: dict) -> None:
def executeCommand(self, cmds: list[MoveSPCommand], ec: dict) -> None:

Execute single or multiple motion commands, robot starts motion immediately after calling

  • Parameters:
    • [in] cmds Command list, allowed number is 1-1000
    • [out] ec Error code, only feedbacks errors before execution, including: 1) Network connection problem; 2) Command number does not match; 3) Robot cannot move in current state, such as not powered on

setDefaultSpeed()

def setDefaultSpeed(self, speed: int, ec: dict) -> None:

Set default motion speed, initial value is 100

  • Note: This value represents the maximum end linear speed (unit mm/s), automatically calculates corresponding joint speed
  • Parameters:
    • [in] speed This interface does not limit the parameter range. The actual effective range of end linear speed is 5-4000 (collaborative), 5-7000 (industrial). Joint speed percentage is divided into 5 ranges:
      • < 100 : 10% ;
      • 100 ~ 200 : 30% ;
      • 200 ~ 500 : 50% ;
      • 500 ~ 800 : 80% ;
      • 800 : 100%

    • [out] ec Error code

setDefaultZone()

def setDefaultZone(self, zone: int, ec: dict) -> None:

Set default zone

  • Note: This value represents the maximum zone radius (unit: mm), automatically calculates zone percentage. If not set, it is 0 (fine, no zone)
  • Parameters:
    • [in] zone: This interface does not limit the parameter range. The actual effective range of zone radius is 0-200. Zone percentage is divided into 4 ranges:
      • < 1 : 0 (fine) ;
      • 1 ~ 20 : 10% ;
      • 20 ~ 60 : 30% ;
      • 60 : 100%

    • [out] ec: Error code

setDefaultConfOpt()

def setDefaultConfOpt(self, forced: bool, ec: dict) -> None:

Set whether to use axis configuration data (confData) to calculate inverse kinematics. Initial value is false

  • Parameters:
    • [in] forced true - Use confData of motion command to calculate Cartesian point inverse kinematics, return error if calculation fails; false - Do not use, select the nearest solution to the current axis angle of the manipulator when inverse kinematics
    • [out] ec Error code

setMaxCacheSize()

def setMaxCacheSize(self, number: int, ec: dict) -> None:

Set maximum cache command count, refers to the number of waypoints sent to the controller to be planned, allowed range [1,300], initial value is 30.

  • Note: If the trajectory is mostly short trajectory, you can increase this value to avoid robot stopping motion due to command sending not being timely (after stopping, if there are unexecuted commands, you can moveStart() to continue;

  • Parameters:

    • [in] number: Count
    • [out] ec Error code

adjustSpeedOnline()

def adjustSpeedOnline(self, scale: float, ec: dict) -> None:

Dynamically adjust robot motion rate, takes effect in non-real-time mode.

  • Parameters:
    • [in] scale: Motion command speed ratio, range 0.01 - 1. When scale is set to 1, the robot will move at the original path speed.
    • [out] ec: Error code

getAcceleration()

def getAcceleration(self, acc: PyTypeDouble, jerk: PyTypeDouble, ec: dict) -> None:

Read current acceleration/deceleration and jerk

  • Parameters:
    • [out] acc: Percentage of system preset acceleration
    • [out] jerk: Percentage of system preset jerk
    • [out] ec: Error code

adjustAcceleration()

def adjustAcceleration(self, acc: float, jerk: float, ec: dict) -> None:

Adjust motion acceleration/deceleration and jerk. If called during robot motion, the current executing command does not take effect, the next command takes effect

  • Parameters:
    • [in] acc: Percentage of system preset acceleration, range [0.2, 1.5], no error will be reported if out of range, automatically changed to upper or lower limit value
    • [in] jerk: Percentage of system preset jerk, range [0.1, 2], no error will be reported if out of range, automatically changed to upper or lower limit value
    • [out] ec: Error code

setEventWatcher()

def setEventWatcher(self, eventType: Event, callback: typing.Callable[[dict], None], ec: dict) -> None:

Set callback function for receiving events

  • Parameters:
    • [in] eventType: Event type
    • [in] callback: Callback function for handling events. Note:
      1. For Event::moveExecution, the callback function is executed in the same thread, please avoid operations with long execution time in the function;
      2. Event::safety is callback in an independent thread each time, no execution time limit
    • [out] ec: Error code

queryEventInfo()

def queryEventInfo(self, eventType: Event, ec: dict) -> dict:

Query event information. Same as the information provided when setEventWatcher() callback, the difference is that this interface is an active query method

  • Parameters:
    • [in] eventType: Event type
    • [out] ec: Error code
  • Return: Event information

startJog()

def startJog(self, space: JogOptSpace, rate: float, step: float, index: int, direction: bool, ec: dict) -> None:

Start jog robot, need to switch to manual operation mode.

  • Note: After calling this interface and the robot starts moving, regardless of whether the robot has stopped by itself, you must call stop() to end the jog operation, otherwise the robot will always be in jog running state.
  • Parameters:
    • [in] space jog reference coordinate system.
      1. Tool/workpiece coordinate system usage principle is the same as setToolset();
      2. Industrial six-axis models and xMateCR/SR six-axis models support two singularity avoidance methods Jog:Space::singularityAvoidMode, Space::baseParallelMode
      3. CR5 axis models support parallel base mode Jog:Space::baseParallelMode
    • [in] rate: Rate, range 0.01 - 1
    • [in] step: Step size. Unit: Cartesian space - millimeter | axis space - degree. Step size greater than 0 is acceptable, no upper limit is set, if the robot cannot continue jogging, it will stop moving by itself.
    • [in] index According to different space, this parameter meaning is as follows:
      1. World coordinate system, base coordinate system, flange coordinate system, tool workpiece coordinate system: a) 6-axis models: 0~5 correspond to X, Y, Z, Rx, Ry, Rz respectively. >5 represents external axis (if any) b) 7-axis models 6 represents elbow joint, >6 represents external axis (if any)
      2. Axis space: Joint number, counted from 0
      3. Singularity avoidance mode, parallel base mode: a) 6-axis models: 05 correspond to X, Y, Z, J4(4 axis), Ry, J6(6 axis); b) 5-axis models: 04 correspond to X, Y, Z, Ry, J5(5 axis)
    • [in] direction According to different space and index, this parameter meaning is as follows:
      1. Singularity avoidance mode J4: true - ±180° | false - 0°;
      2. Parallel base mode J4 & Ry: true - ±180° | false - 0°
      3. Others, true - Positive direction | false - Negative direction
    • [out] ec Error code

setAvoidSingularity()

def setAvoidSingularity(self, method: AvoidSingularityMethod, enable: bool, threshold: float, ec: dict) -> None:

Turn on/off singularity avoidance function. Only applicable to some models:

  1. Four-axis lock: Supports industrial six-axis, xMateCR and xMateSR six-axis models;
  2. Sacrifice posture: Supports all six-axis models;
  3. Axis space interpolation: Supports industrial six-axis models
  • Parameters:
    • [in] method: Singularity avoidance method
    • [in] enable: true - Enable function | false - Disable. For four-axis lock method, ensure that 4th axis is at zero position before enabling.
    • [in] limit: Different avoidance methods, this parameter meaning is respectively:
      1. Sacrifice posture: Allowable posture error, range (0, PI*2], unit radian
      2. Axis space interpolation: Avoidance radius, range [0.005, 10], unit meter
      3. Four-axis lock: No parameter
    • [out] ec: Error code

getAvoidSingularity()

def getAvoidSingularity(self, method: AvoidSingularityMethod, ec: dict) -> bool:

Query whether in singularity avoidance state

  • Parameters:
    • [in] method: Singularity avoidance method
    • [out] ec: Error code
  • Return: true - Enabled | false – Disabled

checkPath() [1/3]

def checkPath(self, start: CartesianPosition, start_joint: list[float], target: CartesianPosition, ec: dict) -> list[float]:

Check if Cartesian trajectory is reachable, straight line trajectory. Supports rail, returned target axis angle is axis count + external axis count

  • Parameters:
    • [in] start: Start point
    • [in] start_joint: Start axis angle [radian]
    • [in] target: Target point
    • [out] ec: Error code
  • Return: Calculated target axis angle, only valid when no error code

checkPath() [2/3]

def checkPath(self, start_joint: list[float], points: list[CartesianPosition], target_joint_calculated: list, ec: dict) -> int:

Check multiple straight line trajectories

  • Parameters:
    • [in] start_joint: Start axis angle, unit [radian]
    • [in] points: Cartesian points, at least 2 points, the first point is the start point
    • [out] target_joint_calculated: If check passed. Return calculated target axis angle
    • [out] ec: Reason for check failure
  • Return: If check failed, return the index of the error target point in points. Return 0 in other cases

checkPath() [3/3]

def checkPath(self, start: CartesianPosition, start_joint: list[float], aux: CartesianPosition, target: CartesianPosition, ec: dict, angle: float = 0.0, rot_type: MoveCFCommandRotType = ...) -> list[float]:

Check if Cartesian trajectory is reachable, including arc, full circle. Supports rail, returned target axis angle is axis count + external axis count

  • Parameters:
    • [in] start: Start point
    • [in] start_joint: Start axis angle [radian]
    • [in] aux: Auxiliary point
    • [in] target: Target point
    • [out] ec: Error code
    • [in] angle: Full circle execution angle, not equal to zero means check full circle trajectory
    • [in] rot_type: Full circle rotation type
  • Return: Calculated target axis angle, only valid when no error code

getDI()

def getDI(self, board: int, port: int, ec: dict) -> bool:

Query digital input signal value.

  • Parameters:
    • [in] board:IO board number.
    • [in] port:Signal port number.
    • [out] ec:Error code.
  • Return:true - On, false - Off.

getDO()

def getDO(self, board: int, port: int, ec: dict) -> bool:

Query digital output signal value.

  • Parameters:
    • [in] board:IO board number.
    • [in] port:Signal port number.
    • [out] ec:Error code.
  • Return:true - On, false - Off.

setDI()

def setDI(self, board: int, port: int, state: bool, ec: dict) -> None:

Set digital input signal value, can only be set when input simulation mode is enabled (see setSimulationMode()).

  • Parameters:
    • [in] board:IO board number.
    • [in] port:Signal port number.
    • [in] state:true - On, false - Off.
    • [out] ec:Error code.

setDO()

def setDO(self, board: int, port: int, state: bool, ec: dict) -> None:

Set digital output signal value.

  • Parameters:
    • [in] board:IO board number.
    • [in] port:Signal port number.
    • [in] state:true - On, false - Off.
    • [out] ec:Error code.

getAI()

def getAI(self, board: int, port: int, ec: dict) -> float:

Read analog input signal value

  • Parameters:
    • [in] board IO board number
    • [in] port Signal port number
    • [out] ec Error code
  • Return:Signal value

setAO()

def setAO(self, board: int, port: int, value: float, ec: dict) -> None:

Set analog output signal

  • Parameters:
    • [in] board IO board number
    • [in] port Signal port number
    • [in] value Output value
    • [out] ec Error code

readRegister()

def readRegister(self, name: str, index: int, value: PyTypeBool, ec: dict) -> None:

Read register value. Can read single register, register array, or read register array by index. If you want to read the entire register array, pass list of corresponding type to value, index value is ignored.

  • Parameters:
    • [in] name Register name
    • [in] index Read element in register array by index, starting from 0. The following two cases will report errors: 1) Index exceeds array length; 2) Register is not array but index > 0
    • [out] value Register value, allowed types are bool/int/float
    • [out] ec Error code

writeRegister()

def writeRegister(self, name: str, index: int, value: bool, ec: dict) -> None:

Write register value. Can write single register, register array, or write a certain element in register array by index. If you want to write the entire register array, pass list of corresponding type to value, index value is ignored.

  • Parameters:
    • [in] name Register name
    • [in] index Array index, starting from 0. The following two cases will report errors: 1) Index exceeds array length; 2) Register is not array but index > 0
    • [in] value Written value, allowed types are bool/int/float, and list[bool/int/float]
    • [out] ec Error code

setxPanelVout()

def setxPanelVout(self, opt: int, ec: dict) -> None:

Set xPanel external power supply mode. Note: Only some models support xPanel function, models that do not support will return error code

  • Parameters:
    • [in] opt Mode
    • [out] ec Error code

setSimulationMode()

def setSimulationMode(self, state: bool, ec: dict) -> None:

Set input simulation mode

  • Parameters:
    • [in] state true - Enable | false - Disable
    • [out] ec Error code

getKeypadState()

def getKeypadState(self, ec: dict) -> KeyPadState:

Get end keypad state, models that do not support will return error code

  • Parameters:
    • [out] ec Error code
  • Return: End keypad state. End keypad number see the illustration of end handle in "xCore Robot Control System User Manual".

setxPanelRS485()

def setxPanelRS485(self, opt: int, if_rs485: bool, ec: dict) -> None:

Use CR and SR end 485 communication function, need to modify end parameter configuration, can configure parameters through this interface

  • Parameters:
    • [in] opt External power supply mode, 0: No output, 1: Reserved, 2: 12v, 3: 24v
    • [in] if_rs485 Interface working mode, whether to enable end 485 communication
    • [out] ec Error code

XPRWModbusRTUReg()

def XPRWModbusRTUReg(self, slave_addr: int, fun_cmd: int, reg_addr: int, data_type: str, num: int, data_array: PyTypeVectorInt, if_crc_reverse: bool, ec: dict) -> None:

Read/write modbus register through xPanel terminal

  • Parameters:
    • [in] slave_addr Device address 0 - 65535
    • [in] fun_cmd Function code 0x03 0x04 0x06 0x10
    • [in] reg_addr Register address 0 - 65535
    • [in] data_type Supported data types int32、int16、uint32、uint16
    • [in] num Number of continuous operation registers at once 0 - 3, when type is int16/uint16, maximum is 3; when type is int32/uint32、float, maximum is 1, when function code is 0x06, this parameter is invalid
    • [in/out] data_array Array of sent or received data, non-const, when function code is 0x06, only use data[0] of this array, at this time num value is invalid, except 0x06 function code, size needs to match num
    • [in] if_crc_reverse Whether to change CRC check high and low bits, default false, few manufacturer terminal tools need to reverse
    • [out] ec Error code

XPRWModbusRTUCoil()

def XPRWModbusRTUCoil(self, slave_addr: int, fun_cmd: int, coil_addr: int, num: int, data_array: PyTypeVectorBool, if_crc_reverse: bool, ec: dict) -> None:

Read/write modbus coil or discrete input through xPanel terminal

  • Parameters:
    • [in] slave_addr Device address 0 - 65535
    • [in] fun_cmd Function code 0x01 0x02 0x05 0x0F
    • [in] coil_addr Coil or discrete input register address 0 - 65535
    • [in] num Number of continuous read/write coil discrete input at once (0 - 48), when function code is 0x05, this value is invalid
    • [in/out] data_array Array of sent or received data, non-const, when function code is 0x05, only use data[0] of this array, at this time num value is invalid, except 0x05 function code, size needs to match num
    • [in] if_crc_reverse Whether to change CRC check high and low bits, default false, few manufacturer terminal tools need to reverse
    • [out] ec Error code

XPRS485SendData()

def XPRS485SendData(self, send_byte: int, rev_byte: int, send_data: list[int], rev_data: PyTypeVectorInt, ec: dict) -> None:

Directly transmit RTU protocol raw data through xPanel end

  • Parameters:
    • [in] send_byte Send byte length 0 - 16
    • [in] rev_byte Receive byte length 0 - 16
    • [in] send_data Send byte data array length needs to match send_byte parameter
    • [out] rev_data Receive byte data array length needs to match rev_byte parameter
    • [out] ec Error code

4 RL Project

projectsInfo()

def projectsInfo(self, ec: dict) -> list[RLProjectInfo]:

Query RL project names and tasks in industrial computer

  • Parameters:
    • [out] ec Error code
  • Return:Project information list, return empty list if no project created

loadProject()

def loadProject(self, name: str, tasks: list[str], ec: dict) -> None:

Load project

  • Parameters:
    • [in] name Project name
    • [in] tasks Tasks to run. This parameter must be specified and cannot be empty, otherwise the project cannot be executed.
    • [out] ec Error code

ppToMain()

def ppToMain(self, ec: dict) -> None:

Program pointer jumps to main. After calling, wait for the controller to parse the project and return, blocking time depends on project size, timeout time is set to 10 seconds.

  • Parameters:
    • [out] ec Error code. Error code can provide limited information, cannot feedback errors such as RL syntax error, variable does not exist, etc. Can query error log through queryControllerLog().

runProject()

def runProject(self, ec: dict) -> None:

Start running currently loaded project

  • Parameters:
    • [out] ec Error code

pauseProject()

def pauseProject(self, ec: dict) -> None:

Pause running project

  • Parameters:
    • [out] ec Error code

setProjectRunningOpt()

def setProjectRunningOpt(self, rate: float, loop: bool, ec: dict) -> None:

Change project running speed and loop mode

  • Parameters:
    • [in] rate Running rate, range 0.01 - 1
    • [in] loop true - Loop execution | false - Single execution
    • [out] ec Error code

toolsInfo()

def toolsInfo(self, ec: dict) -> list[WorkToolInfo]:

Query tool information of currently loaded project

  • Parameters:
    • [out] ec Error code
  • Return:Tool information list, if no project loaded or no tool created, return default tool tool0 information

wobjsInfo()

def wobjsInfo(self, ec: dict) -> list[WorkToolInfo]:

Query workpiece information of currently loaded project

  • Parameters:
    • [out] ec Error code
  • Return:Workpiece information list, if no project loaded or no workpiece created, return empty list

importProject()

def importProject(self, file_path: str, overwrite: bool, ec: dict) -> str:

Import local RL project compressed package into controller. Block until import completed or failed

  • Parameters:
    • [in] file_path Local .zip compressed package path, file size within 10M
    • [in] overwrite Whether to overwrite files with the same name, yes: overwrite; no: automatically rename
    • [out] ec Error code
  • Return:Project name (e.g. automatically renamed, return after renaming)

removeProject()

def removeProject(self, project_name: str, ec: dict, remove_all: bool = False) -> None:

Delete RL project in controller

  • Parameters:
    • [in] project_name Project name
    • [in] remove_all Whether to delete all projects, default value is false
    • [out] ec Error code

importFile()

def importFile(self, src_file_path: str, dest: str, overwrite: bool, ec: dict) -> str:

Import local file into controller. Block until import completed or failed

  • Parameters:
    • [in] src_file_path Local file path. File size within 10M
    • [in] dest Target path
      • Transfer single RL project .mod file: project/[project name]/[task name]/[mod file name]
      • Transfer RL project .json/.xml/sys format configuration file: project/[project name]/[file name]. Note: Configuration file name cannot be changed, such as task file name must be "task.xml"
    • [in] overwrite Overwrite files with the same name: true - Overwrite | false - Automatically rename. Only .mod files support automatic renaming
    • [out] ec Local file does not exist; file format error; transfer failed; target path does not meet requirements, etc.
  • Return:File name after successful import

removeFiles()

def removeFiles(self, file_path_list: list[str], ec: dict) -> None:

Delete files in controller. Note: Project .xml, .json and other configuration files cannot be deleted, only replaced

  • Parameters:
    • [in] file_path_list List of file paths, single file path as follows:
        1. Delete .mod file under a project task: project/[project name]/[task name]/[mod file name]
        1. Delete a project task: project/[project name]/[task name]
    • [out] ec Parameter format error or network error. No error code returned if project or task or file does not exist

setToolInfo()

def setToolInfo(self, tool_info: WorkToolInfo, ec: dict) -> None:

Set global tool information, or create/set pose information and load information of tools in RL project

  • Parameters:
    • [in] tool_info Tool information
    • [out] ec Global tools generally won't set failed. Tools in project may set failed, such as pushing project tool configuration file to controller but not reloading project, error code will be returned when tool configuration is inconsistent

setWobjInfo()

def setWobjInfo(self, wobj_info: WorkToolInfo, ec: dict) -> None:

Set global workpiece information, or create/set pose information and load information of workpieces in RL project

  • Parameters:
    • [in] wobj_info Workpiece information
    • [out] ec Similarly to setToolInfo, global workpieces generally won't set failed. Workpieces in project may set failed

enableDrag()

def enableDrag(self, space: int, type: int, ec: dict, enable_drag_button: bool) -> None:

Enable drag

  • Parameters:
    • [in] space Drag space, axis space drag only supports free drag type
    • [in] type Drag type
    • [out] ec Error code
    • [in] enable_drag_button true - After enabling drag function, can directly drag robot without pressing end button

disableDrag()

def disableDrag(self, ec: dict) -> None:

Disable drag

  • Parameters:
    • [out] ec Error code

setRtNetworkTolerance()

def setRtNetworkTolerance(self, percent: int, ec: dict) -> None:

Set real-time motion command network delay threshold (RobotAssist–RCI "Packet Loss Threshold"), range 0~100. Must be called before switching to RtCommandMode, otherwise it will not take effect.

  • Parameters:
    • [in] percent Allowable packet loss/delay threshold percentage
    • [out] ec: Error code

startRecordPath()

def startRecordPath(self, duration: int, ec: dict) -> None:

Start recording path

  • Parameters:
    • [in] duration Path duration, unit: second, range 1~1800. This duration is only used for range check, the controller will not stop recording after timeout, need to call stopRecordPath() to stop
    • [out] ec Error code

stopRecordPath()

def stopRecordPath(self, ec: dict) -> None:

Stop recording path, if recording successful (no error code) then path data is saved in cache

  • Parameters:
    • [out] ec Error code

cancelRecordPath()

def cancelRecordPath(self, ec: dict) -> None:

Cancel recording, cached path data will be deleted

  • Parameters:
    • [out] ec Error code

saveRecordPath()

def saveRecordPath(self, name: str, ec: dict, saveAs: str = '') -> None:

Save recorded path

  • Parameters:
    • [in] name Path name
    • [out] ec Error code
    • [in] saveAs Rename, optional parameter. If a path has been recorded but not saved, save the path with this name. If there is no unsaved path, rename the saved path named "name" to "saveAs"

replayPath()

def replayPath(self, name: str, rate: float, ec: dict) -> None:

Motion command - Path replay Similar to other motion commands, after calling replayPath, need to call moveStart to start motion.

  • Parameters:
    • [in] name Path name to replay
    • [in] rate Replay rate, should be less than 3.0, 1 is original path rate. Note that when rate is greater than 1, drive cannot follow error may occur
    • [out] ec Error code

removePath()

def removePath(self, name: str, ec: dict, removeAll: bool = False) -> None:

Delete saved path

  • Parameters:
    • [in] name Path name to delete
    • [out] ec Error code. If path does not exist, error code will not be set
    • [in] removeAll Whether to delete all paths, optional parameter, default no
  • Return:None

queryPathLists()

def queryPathLists(self, ec: dict) -> list[str]:

Query all saved path names

  • Parameters:
    • [out] ec Error code
  • Return:Name list, return empty list if no path

calibrateForceSensor()

def calibrateForceSensor(self, all_axes: bool, axis_index: int, ec: dict) -> None:

Force sensor calibration (about 100ms, non-blocking wait for completion). Need to set correct load through setToolset() before calibration.

  • Parameters
    • [in] all_axes true - Calibrate all axes | false - Single axis calibration
    • [in] axis_index Axis index, range [0, DoF), only effective when single axis calibration
    • [out] ec Error code

6 Force Control Commands

forceControl()

def forceControl(self) -> ...:

Force control command class

  • Return:ForceControl_T

getEndTorque()

def getEndTorque(self, ref_type: FrameType, joint_torque_measured: PyTypeVectorDouble, external_torque_measured: PyTypeVectorDouble, cart_torque: PyTypeVectorDouble, cart_force: PyTypeVectorDouble, ec: dict) -> None:

Get current torque information

  • Parameters:
    • [in] ref_type Torque relative reference frame:
      • FrameType::world - End relative to world coordinate system torque information;
      • FrameType::flange - End relative to flange plate torque information;
      • FrameType::tool - End relative to TCP point torque information.
    • [out] joint_torque_measured Each axis measured force
    • [out] external_torque_measured Each axis external force
    • [out] cart_torque Cartesian space torque [X, Y, Z], unit Nm
    • [out] cart_force Cartesian space force [X, Y, Z], unit N
    • [out] ec Error code

fcInit()

def fcInit(self, frame_type: FrameType, ec: dict) -> None:

Force control initialization

  • Parameters:
    • [in] frame_type Force control coordinate system, supports world/wobj/tool/base/flange. Tool workpiece coordinate system uses coordinate system set by setToolset()
    • [out] ec Error code

fcStart()

def fcStart(self, ec: dict) -> None:

Start force control, call after fcInit(). If need to execute motion commands in force control mode, can execute after fcStart(). Note that if motion commands are sent through moveAppend() before fcStart() but not started, these motion commands will be executed after fcStart.

  • Parameter:[out] ec Error code

fcStop()

def fcStop(self, ec: dict) -> None:

Stop force control

  • Parameter [out] ec Error code

setControlType()

def setControlType(self, type: int, ec: dict) -> None:

Set impedance control type

  • Parameters:
    • [in] type 0 - Joint impedance | 1 - Cartesian impedance
    • [out] ec Error code

setLoad()

def setLoad(self, load: Load, ec: dict) -> None:

Set load information used by force control module, can be called after fcStart().

  • Parameters:
    • [in] load Load
    • [out] ec Error code

setJointStiffness()

def setJointStiffness(self, stiffness: list[float], ec: dict) -> None:

Set joint impedance stiffness. Takes effect after calling after fcInit(), maximum stiffness of different models is different, please refer to the description of SetJntCtrlStiffVec command in "xCore Control System Manual"

  • Parameters:
    • [in] stiffness Each axis stiffness
    • [out] ec Error code

setCartesianStiffness()

def setCartesianStiffness(self, stiffness: list[float], ec: dict) -> None:

Set Cartesian impedance stiffness. Takes effect after calling after fcInit(), maximum stiffness of different models is different, please refer to the description of SetCartCtrlStiffVec command in "xCore Control System Manual"

  • Parameters:
    • [in] stiffness In order: X Y Z direction impedance force stiffness [N/m], X Y Z direction impedance torque stiffness [Nm/rad]
    • [out] ec Error code

setCartesianNullspaceStiffness()

def setCartesianNullspaceStiffness(self, stiffness: float, ec: dict) -> None:

Set Cartesian nullspace impedance stiffness. Takes effect after calling after fcInit()

  • Parameters:
    • [in] stiffness Range [0,4], greater than 4 will be default set to 4, unit Nm/rad
    • [out] ec Error code

setJointDesiredTorque()

def setJointDesiredTorque(self, torque: list[float], ec: dict) -> None:

Set joint desired torque. Can be called after fcStart()

  • Parameters:
    • [in] torque Torque value, range [-30,30], unit Nm
    • [out] ec Error code

setCartesianDesiredForce()

def setCartesianDesiredForce(self, value: list[float], ec: dict) -> None:

Set Cartesian desired force/torque. Can be called after fcStart()

  • Parameters:
    • [in] value In order: X Y Z direction Cartesian desired force, range [-60,60], unit N; X Y Z direction Cartesian desired torque, range [-10,10], unit Nm
    • [out] ec Error code

setSineOverlay()

def setSineOverlay(self, line_dir: int, amplify: float, frequency: float, phase: float, bias: float, ec: dict) -> None:

Set sine search motion rotating around single axis. Set impedance control type to Cartesian impedance (i.e. setControlType(1)) after, before startOverlay() call takes effect. Maximum search motion amplitude and maximum search motion frequency of different models are different, please refer to the description of SetSineOverlay command in "xCore Control System Manual".

  • Parameters:
    • [in] line_dir Search motion reference axis: 0 - X | 1 - Y | 2 - Z
    • [in] amplify Search motion amplitude, unit Nm
    • [in] frequency Search motion frequency, unit Hz
    • [in] phase Search motion phase, range [0, PI], unit radian
    • [in] bias Search motion bias, range [0, 10], unit Nm
    • [out] ec Error code

setLissajousOverlay()

def setLissajousOverlay(self, plane: int, amplify_one: float, frequency_one: float, amplify_two: float, frequency_two: float, phase_diff: float, ec: dict) -> None:

Set Lissajous search motion in plane Set impedance control type to Cartesian impedance (i.e. setControlType(1)) after, before startOverlay() call takes effect.

  • Parameters:
    • [in] plane Search motion reference plane: 0 - XY | 1 - XZ | 2 - YZ
    • [in] amplify_one Search motion one direction amplitude, range [0, 20], unit Nm
    • [in] frequency_one Search motion one direction frequency, range [0, 5], unit Hz
    • [in] amplify_two Search motion two direction amplitude, range [0, 20] unit Nm
    • [in] frequency_two Search motion two direction frequency, range [0, 5], unit Hz
    • [in] phase_diff Search motion two direction phase difference, range [0, PI], unit radian
    • [out] ec Error code

startOverlay()

def startOverlay(self, ec: dict) -> None:

Start search motion. Takes effect after calling after fcStart() Search motion is the superposition of previously set setSineOverlay() or setLissajousOverlay()

  • Parameters:
    • [out] ec Error code

stopOverlay()

def stopOverlay(self, ec: dict) -> None:

Stop search motion

  • Parameters:
    • [out] ec Error code

pauseOverlay()

def pauseOverlay(self, ec: dict) -> None:

Pause search motion. Takes effect after calling after startOverlay()

  • Parameters:
    • [out] ec Error code

restartOverlay()

def restartOverlay(self, ec: dict) -> None:

Restart paused search motion. Takes effect after calling after pauseOverlay().

  • Parameters:
    • [out] ec Error code

setForceCondition()

def setForceCondition(self, range: list[float], isInside: bool, timeout: float, ec: dict) -> None:

Set termination conditions related to contact force

  • Parameters:
    • [in] range Force limit in each direction { X_min, X_max, Y_min, Y_max, Z_min, Z_max }, unit N. When setting lower limit, negative value represents maximum value in negative direction; when setting upper limit, negative value represents minimum value in negative direction.
    • [in] isInside true - Stop waiting when exceeding limit condition; false - Stop waiting when meeting limit condition
    • [in] timeout Timeout time, range [1, 600], unit second
    • [out] ec Error code

setTorqueCondition()

def setTorqueCondition(self, range: list[float], isInside: bool, timeout: float, ec: dict) -> None:

Set termination conditions related to contact torque

  • Parameters:
    • [in] range Torque limit in each direction { X_min, X_max, Y_min, Y_max, Z_min, Z_max }, unit Nm. When setting lower limit, negative value represents maximum value in negative direction; when setting upper limit, negative value represents minimum value in negative direction.
    • [in] isInside true - Stop waiting when exceeding limit condition; false - Stop waiting when meeting limit condition
    • [in] timeout Timeout time, range [1, 600], unit second
    • [out] ec Error code

setPoseBoxCondition()

def setPoseBoxCondition(self, supervising_frame: Frame, box: list[float], isInside: bool, timeout: float, ec: dict) -> None:

Set termination conditions related to contact position

  • Parameters:
    • [in] supervising_frame Reference coordinate system where the cuboid is located, relative to external workpiece coordinate system (Toolset::ref set by setToolset())
    • [in] box Define a cuboid { X_start, X_end, Y_start, Y_end, Z_start, Z_end }, unit meter
    • [in] isInside true - Stop waiting when exceeding limit condition; false - Stop waiting when meeting limit condition
    • [in] timeout Timeout time, range [1, 600], unit second
    • [out] ec Error code

waitCondition()

def waitCondition(self, ec: dict) -> None:

Activate previously set termination conditions and wait until these conditions are met or timeout

  • Parameters:
    • [out] ec Error code

fcMonitor()

def fcMonitor(self, enable: bool, ec: dict) -> None:

Start/stop force control module protection monitoring After setting monitoring parameters, it does not take effect immediately, it takes effect after calling fcMonitor(true), and remains until calling fcMonitor(false) to end. After ending, the protection threshold returns to the default value, that is, there will still be protection effect, after closing monitoring, it is no longer the user-set parameters.

  • Parameters:
    • [in] enable true - Enable | false - Disable
    • [out] ec Error code

setJointMaxVel()

def setJointMaxVel(self, velocity: list[float], ec: dict) -> None:

Set maximum joint velocity in force control mode

  • Parameters:
    • [in] velocity Joint velocity [rad/s], range >=0
    • [out] ec Error code

setJointMaxMomentum()

def setJointMaxMomentum(self, momentum: list[float], ec: dict) -> None:

Set maximum joint momentum in force control mode Calculation method: F*t, can be understood as impulse, F is torque sensor reading, t is control cycle, if it exceeds the momentum threshold for 30 consecutive cycles, protection will be triggered

  • Parameters:
    • [in] momentum Momentum [N·s], range >=0
    • [out] ec Error code

setJointMaxEnergy()

def setJointMaxEnergy(self, energy: list[float], ec: dict) -> None:

Set maximum joint energy in force control mode Calculation method: F*v, can be understood as power, F is torque sensor reading, v is joint velocity, if it exceeds the energy threshold for 30 consecutive cycles, protection will be triggered

  • Parameters:
    • [in] energy Energy [N·rad/s], range >=0
    • [out] ec Error code

setCartesianMaxVel()

def setCartesianMaxVel(self, velocity: list[float], ec: dict) -> None:

Set maximum velocity of manipulator end relative to base coordinate system in force control mode

  • Parameters:
    • [in] velocity In order: X Y Z [m/s], A B C [rad/s], range >=0
    • [out] ec Error code