2016-08-30 21:44:11 +00:00
|
|
|
#ifndef IK_TRAJECTORY_HELPER_H
|
|
|
|
#define IK_TRAJECTORY_HELPER_H
|
|
|
|
|
|
|
|
enum IK2_Method
|
|
|
|
{
|
2018-09-23 21:17:31 +00:00
|
|
|
IK2_JACOB_TRANS = 0,
|
|
|
|
IK2_PURE_PSEUDO,
|
|
|
|
IK2_DLS,
|
|
|
|
IK2_SDLS,
|
|
|
|
IK2_DLS_SVD,
|
|
|
|
IK2_VEL_DLS,
|
2016-09-22 20:27:09 +00:00
|
|
|
IK2_VEL_DLS_WITH_ORIENTATION,
|
2018-09-23 21:17:31 +00:00
|
|
|
IK2_VEL_DLS_WITH_NULLSPACE,
|
|
|
|
IK2_VEL_DLS_WITH_ORIENTATION_NULLSPACE,
|
2017-10-19 21:00:53 +00:00
|
|
|
IK2_VEL_SDLS,
|
|
|
|
IK2_VEL_SDLS_WITH_ORIENTATION,
|
2016-08-30 21:44:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class IKTrajectoryHelper
|
|
|
|
{
|
2018-09-23 21:17:31 +00:00
|
|
|
struct IKTrajectoryHelperInternalData* m_data;
|
|
|
|
|
2016-08-30 21:44:11 +00:00
|
|
|
public:
|
2018-09-23 21:17:31 +00:00
|
|
|
IKTrajectoryHelper();
|
|
|
|
virtual ~IKTrajectoryHelper();
|
|
|
|
|
2016-09-27 23:37:49 +00:00
|
|
|
bool computeIK(const double endEffectorTargetPosition[3],
|
2018-09-23 21:17:31 +00:00
|
|
|
const double endEffectorTargetOrientation[4],
|
|
|
|
const double endEffectorWorldPosition[3],
|
|
|
|
const double endEffectorWorldOrientation[4],
|
|
|
|
const double* q_old, int numQ, int endEffectorIndex,
|
|
|
|
double* q_new, int ikMethod, const double* linear_jacobian, const double* angular_jacobian, int jacobian_size, const double dampIk[6]);
|
|
|
|
|
|
|
|
bool computeNullspaceVel(int numQ, const double* q_current, const double* lower_limit, const double* upper_limit, const double* joint_range, const double* rest_pose);
|
|
|
|
bool setDampingCoeff(int numQ, const double* coeff);
|
2016-08-30 21:44:11 +00:00
|
|
|
};
|
2018-09-23 21:17:31 +00:00
|
|
|
#endif //IK_TRAJECTORY_HELPER_H
|