32 Eigen::VectorXd weighting = Eigen::VectorXd::Zero(cols);
37 for (uint32_t i = 0; i < cols ; ++i)
43 if ( (q_dot(i) > 0.0 && ((limits_max[i] - q(i)) < (q(i) - limits_min[i])))
44 || (q_dot(i) < 0.0 && ((limits_max[i] - q(i)) > (q(i) - limits_min[i]))) )
47 double nominator =
pow(limits_max[i]-limits_min[i], 2.0) * (2.0 * q(i) - limits_max[i] - limits_min[i]);
48 double denominator = 4.0 *
pow(limits_max[i] - q(i), 2.0) *
pow(q(i) - limits_min[i], 2.0);
49 if (denominator != 0.0)
51 double partialPerformanceCriterion = fabs(nominator / denominator);
52 weighting(i) = 1 + partialPerformanceCriterion;
58 return weighting.asDiagonal();
virtual Eigen::MatrixXd calculateWeighting(const JointStates &joint_states) const
std::vector< double > limits_min
const LimiterParams & limiter_params_
References the inv. diff. kin. solver parameters.
unsigned int rows() const
Matrix6Xd_t jacobian_data_
References the limiter parameters (up-to-date according to KinematicExtension).
KDL::JntArray current_q_dot_
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
std::vector< double > limits_max