46 static const int DIFF_RULE_LENGTH = 7;
49 static const double DIFF_RULES[3][DIFF_RULE_LENGTH] = {
50 { 0, 0, -2 / 6.0, -3 / 6.0, 6 / 6.0, -1 / 6.0, 0 },
51 { 0, -1 / 12.0, 16 / 12.0, -30 / 12.0, 16 / 12.0, -1 / 12.0, 0 },
52 { 0, 1 / 12.0, -17 / 12.0, 46 / 12.0, -46 / 12.0, 17 / 12.0, -1 / 12.0 }
56 Eigen::MatrixXd::RowXpr joint_array)
59 size_t joint_index = 0;
65 static inline double normalizeAnglePositive(
double angle)
67 return fmod(fmod(angle, 2.0 * M_PI) + 2.0 * M_PI, 2.0 * M_PI);
70 static inline double normalizeAngle(
double angle)
72 double a = normalizeAnglePositive(angle);
78 static inline double shortestAngularDistance(
double start,
double end)
80 double res = normalizeAnglePositive(normalizeAnglePositive(end) - normalizeAnglePositive(start));
83 res = -(2.0 * M_PI - res);
85 return normalizeAngle(res);
A joint from the robot. Models the transform that this joint applies in the kinematic chain....
Representation of a robot's state. This includes position, velocity, acceleration and effort.
const JointModelGroup * getJointModelGroup(const std::string &group) const
Get the model of a particular joint group.
double getVariablePosition(const std::string &variable) const
Get the position of a particular variable. An exception is thrown if the variable is not known.