Kinematics APIs
ArmKinematics
Section titled “ArmKinematics”ArmKinematics provides kinematics computation interfaces for robotic arms.
Create Robotic Arm Kinematics
Section titled “Create Robotic Arm Kinematics”This method is a static method.
-
Method:
create(arg0: ArmType) -> ArmKinematics -
Parameter:
ParameterDescription arg0Robotic arm type. For details, please refer to ArmType. -
Return Value:
An
ArmKinematicsinstance if creation succeeds, otherwiseNone.
Compute Forward Kinematics
Section titled “Compute Forward Kinematics”-
Method:
forward_kinematics(self,arg0: list[float]) -> tuple[alphabot.core.AbcErrorCode, alphabot.core.Pose] -
Parameter:
ParameterDescription arg0Joint angles. -
Return Value:
A tuple containing two elements.
Element Type Description AbcErrorCodeAbcErrorCode.SUCCESSindicates success. For other error codes, please refer to AbcErrorCode.PosePose computed by forward kinematics. For details, please refer to Pose.
Compute Inverse Kinematics
Section titled “Compute Inverse Kinematics”-
Method:
inverse_kinematics(self,pose: alphabot.core.Pose,ref_joints: list[float],mode: int = 0) -> tuple[alphabot.core.AbcErrorCode, list[float]] -
Parameters:
ParameterDescription 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 Type Description AbcErrorCodeAbcErrorCode.SUCCESSindicates 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:
ParameterDescription 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 Type Description AbcErrorCodeAbcErrorCode.SUCCESSindicates success. For other error codes, please refer to AbcErrorCode.list[float]Joint angles.
Set Numerical Precision
Section titled “Set Numerical Precision”-
Method:
set_numerical_precision(self, precision: float) -> None -
Parameter:
ParameterDescription precisionDesired precision. -
Return Value:
None.
ArmType
Section titled “ArmType”| Constant Member | Value | Description |
|---|---|---|
RM65_B | 0 | Robotic arm type |
RM65_6FB | 1 | |
RM65_6F | 2 | |
RM75_B | 3 | |
RM75_6FB | 4 | |
RM75_6F | 5 | |
ZM73L_6F | 6 | |
ZM73R_6F | 7 |
TorsoKinematics
Section titled “TorsoKinematics”TorsoKinematics provides kinematics computation interfaces for the torso.
Create Torso Kinematics
Section titled “Create Torso Kinematics”This method is a static method.
-
Method:
create(arg0: alphabot.core.RobotType) -> TorsoKinematics -
Parameter:
ParameterDescription arg0Robot type. For details, please refer to RobotType. -
Return Value:
A
TorsoKinematicsinstance if creation succeeds, otherwiseNone.
Compute Forward Kinematics
Section titled “Compute Forward Kinematics”-
Method:
forward_kinematics(self,arg0: list[float]) -> tuple[alphabot.core.AbcErrorCode, alphabot.core.AbcTorsoPose4D] -
Parameter:
ParameterDescription arg0Joint angles. -
Return Value:
A tuple containing two elements.
Element Type Description AbcErrorCodeAbcErrorCode.SUCCESSindicates success. For other error codes, please refer to AbcErrorCode.AbcTorsoPose4DPose computed by forward kinematics. For details, please refer to AbcTorsoPose4D.
Compute Inverse Kinematics
Section titled “Compute Inverse Kinematics”-
Method:
inverse_kinematics(self,pose: alphabot.core.AbcTorsoPose4D) -> tuple[alphabot.core.AbcErrorCode, list[float]] -
Parameter:
Parameter Type Description poseInput The target pose. For details, please refer to AbcTorsoPose4D. -
Return Value:
A tuple containing two elements.
Element Type Description AbcErrorCodeAbcErrorCode.SUCCESSindicates success. For other error codes, please refer to AbcErrorCode.list[float]Joint angles computed by inverse kinematics.
Check Joint Limits
Section titled “Check Joint Limits”-
Method:
check_range(self, arg0: list[float]) -> alphabot.core.AbcErrorCode -
Parameter:
ParameterDescription arg0Joint angles. -
Return Value:
AbcErrorCode.SUCCESSindicates all joint values are within limits. For other error codes, please refer to AbcErrorCode.
RobotType
Section titled “RobotType”| Constant Member | Value | Description |
|---|---|---|
AlphaBot1s | 1 | Robot Type |
AlphaBot2 | 2 | |
AlphaBot1s_HuiKe | 3 |
admittance_control_law
Section titled “admittance_control_law”-
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:
ParameterDescription 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 Type Description AbcErrorCodeAbcErrorCode.SUCCESSindicates success. For other error codes, please refer to AbcErrorCode.list[float]Joint angles for the next time step.