Skip to content

Control APIs

The admittance control law is defined in the c++\include\control\admittance_control.h header file. It computes the joint angles for the next time step based on the current end-effector pose, the desired pose, external forces, and the stiffness and damping parameters.

  • Method:

    AbcErrorCode addmittance_control_law(
    std::unique_ptr<alphabot::ArmKinematics> arm,
    const AbcPose pose,
    const AbcType p_stiffness,
    const AbcType r_stiffness,
    const std::array<AbcType, 6> force,
    const AbcType t,
    const std::vector<AbcType> q,
    std::vector<AbcType> next_q)
  • Parameters:

    Parameter
    Type
    Description
    armInputA unique pointer to an ArmKinematics instance.
    poseInputCurrent end-effector pose.
    p_stiffnessInputTranslational stiffness.
    r_stiffnessInputRotational stiffness.
    forceInputSix-dimensional spatial force applied at the end-effector, ordered as [Mx, My, Mz, Fx, Fy, Fz].
    tInputIntegration time, which must be less than or equal to the duration of one control loop.
    qInputCurrent joint angles.
    next_qOutputJoint angles at the next time step.
  • Return Value:

    AbcErrorCode::SUCCESS indicates success. For other error codes, please refer to AbcErrorCode.