Skip to content

Kinematics APIs

ArmKinematics provides kinematics computation interfaces for robotic arms.

This method is a static method.

  • Method:

    create(arg0: ArmType) -> ArmKinematics
  • Parameter:

    Parameter
    Description
    arg0Robotic arm type. For details, please refer to ArmType.
  • Return Value:

    An ArmKinematics instance if creation succeeds, otherwise None.

  • Method:

    forward_kinematics(
    self,
    arg0: list[float]
    ) -> tuple[alphabot.core.AbcErrorCode, alphabot.core.Pose]
  • Parameter:

    Parameter
    Description
    arg0Joint angles.
  • Return Value:

    A tuple containing two elements.

    Element TypeDescription
    AbcErrorCodeAbcErrorCode.SUCCESS indicates success. For other error codes, please refer to AbcErrorCode.
    PosePose computed by forward kinematics. For details, please refer to Pose.
  • Method:

    inverse_kinematics(
    self,
    pose: alphabot.core.Pose,
    ref_joints: list[float],
    mode: int = 0
    ) -> tuple[alphabot.core.AbcErrorCode, list[float]]
  • Parameters:

    Parameter
    Description
    poseEnd-effector pose. For details, please refer to Pose.
    ref_jointsReference joint angles.
    mode- 0: Numerical solution, single-step mode. Suitable when the current pose is close to the target pose; recommended for continuous motion.
    - 1: Numerical solution, multi-step mode. Suitable for larger differences between current and target poses; requires more computation time.
    - 2: Analytical solution.
  • Return Value:

    A tuple containing two elements.

    Element TypeDescription
    AbcErrorCodeAbcErrorCode.SUCCESS indicates success. For other error codes, please refer to AbcErrorCode.
    list[float]Joint angles computed by inverse kinematics.

Analytical Inverse Kinematics (Single Solution)

Section titled “Analytical Inverse Kinematics (Single Solution)”
  • Method:

    inverse_kinematics_analytical(
    self,
    pose: alphabot.core.Pose,
    parameter: float,
    select: int
    ) -> tuple[alphabot.core.AbcErrorCode, list[float]]
  • Parameters:

    Parameter
    Description
    poseEnd-effector pose. For details, please refer to Pose.
    parameterRedundancy parameter.
    selectIndex of the inverse kinematics solution set. It is recommended to use 0. Important: During continuous end-effector motion, do not change this value; keeping the selected solution fixed ensures motion continuity.
  • Return Value:

    A tuple containing two elements.

    Element TypeDescription
    AbcErrorCodeAbcErrorCode.SUCCESS indicates success. For other error codes, please refer to AbcErrorCode.
    list[float]Joint angles.
  • Method:

    set_numerical_precision(self, precision: float) -> None
  • Parameter:

    Parameter
    Description
    precisionDesired precision.
  • Return Value:

    None.


Constant MemberValueDescription
RM65_B0Robotic arm type
RM65_6FB1
RM65_6F2
RM75_B3
RM75_6FB4
RM75_6F5
ZM73L_6F6
ZM73R_6F7

TorsoKinematics provides kinematics computation interfaces for the torso.

This method is a static method.

  • Method:

    create(arg0: alphabot.core.RobotType) -> TorsoKinematics
  • Parameter:

    Parameter
    Description
    arg0Robot type. For details, please refer to RobotType.
  • Return Value:

    A TorsoKinematics instance if creation succeeds, otherwise None.

  • Method:

    forward_kinematics(
    self,
    arg0: list[float]
    ) -> tuple[alphabot.core.AbcErrorCode, alphabot.core.AbcTorsoPose4D]
  • Parameter:

    Parameter
    Description
    arg0Joint angles.
  • Return Value:

    A tuple containing two elements.

    Element TypeDescription
    AbcErrorCodeAbcErrorCode.SUCCESS indicates success. For other error codes, please refer to AbcErrorCode.
    AbcTorsoPose4DPose computed by forward kinematics. For details, please refer to AbcTorsoPose4D.
  • Method:

    inverse_kinematics(
    self,
    pose: alphabot.core.AbcTorsoPose4D
    ) -> tuple[alphabot.core.AbcErrorCode, list[float]]
  • Parameter:

    ParameterTypeDescription
    poseInputThe target pose. For details, please refer to AbcTorsoPose4D.
  • Return Value:

    A tuple containing two elements.

    Element TypeDescription
    AbcErrorCodeAbcErrorCode.SUCCESS indicates success. For other error codes, please refer to AbcErrorCode.
    list[float]Joint angles computed by inverse kinematics.
  • Method:

    check_range(self, arg0: list[float]) -> alphabot.core.AbcErrorCode
  • Parameter:

    Parameter
    Description
    arg0Joint angles.
  • Return Value:

    AbcErrorCode.SUCCESS indicates all joint values are within limits. For other error codes, please refer to AbcErrorCode.


Constant MemberValueDescription
AlphaBot1s1Robot Type
AlphaBot22
AlphaBot1s_HuiKe3
  • Method:

    admittance_control_law(
    arm: ArmKinematics,
    pose: alphabot.core.Pose,
    p_stiffness: float,
    r_stiffness: float,
    force: typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(6)],
    t: float,
    q: list[float]
    ) -> tuple[alphabot.core.AbcErrorCode, list[float]]
  • Parameters:

    Parameter
    Description
    armAn object of type ArmKinematics.
    poseCurrent end-effector pose. Refer to Pose for details.
    p_stiffnessTranslational stiffness.
    r_stiffnessRotational stiffness.
    forceSix-dimensional spatial force applied at the end-effector, ordered as [Mx, My, Mz, Fx, Fy, Fz].
    tIntegration time, which must be less than or equal to the duration of one control loop.
    qCurrent joint angles.
  • Return Value:

    A tuple containing two elements.

    Element TypeDescription
    AbcErrorCodeAbcErrorCode.SUCCESS indicates success. For other error codes, please refer to AbcErrorCode.
    list[float]Joint angles for the next time step.