Class XArmIKSolver

Inheritance Relationships

Base Type

Class Documentation

class XArmIKSolver : public pfield::IKSolver

Public Functions

explicit XArmIKSolver(const std::string &urdf_path)
~XArmIKSolver() override = default
virtual bool solve(const Eigen::Isometry3d &targetPose, const std::vector<double> &seed, std::vector<double> &solution, Eigen::Matrix<double, 6, Eigen::Dynamic> &J, std::string &errorMsg) override

Solve the IK problem for the XArm robot given a target end-effector pose, a seed joint configuration. Solving both the JointAngles and the Jacobian in one call to avoid redundant computations.

Parameters:
  • targetPose[in] The desired end-effector pose expressed in the robot’s base frame

  • seed[in] The current joint configuration to use as a seed for the IK solver [rad]

  • solution[out] The resulting joint configuration [rad]

  • J[out] The resulting Jacobian matrix (6xN) where N is the number of joints

  • errorMsg[out] An error message string to be populated if the IK fails

Returns:

true if the IK problem was solved successfully, false otherwise

virtual bool computeJacobian(const std::vector<double> &jointPositions, Eigen::Matrix<double, 6, Eigen::Dynamic> &J) override
inline virtual std::vector<std::string> getJointNames() const override
inline virtual std::vector<double> getHomeConfiguration() const override