18 #ifndef COB_TWIST_CONTROLLER_CONSTRAINTS_CONSTRAINT_H 19 #define COB_TWIST_CONTROLLER_CONSTRAINTS_CONSTRAINT_H 24 #include <kdl/chainjnttojacsolver.hpp> 25 #include <kdl/chainfksolvervel_recursive.hpp> 33 template <
typename PRIO = u
int32_t>
51 template <
typename T_PARAMS,
typename PRIO = u
int32_t>
56 T_PARAMS constraint_params,
61 jnt_to_jac_(jnt_to_jac),
62 fk_solver_vel_(fk_solver_vel)
68 virtual std::string getTaskId()
const;
69 virtual Eigen::MatrixXd getTaskJacobian()
const;
70 virtual Eigen::VectorXd getTaskDerivatives()
const;
72 virtual void calculate();
74 virtual double getActivationGain()
const;
75 virtual double getSelfMotionMagnitude(
const Eigen::MatrixXd& particular_solution,
76 const Eigen::MatrixXd& homogeneous_solution)
const;
78 double getActivationGain(
double current_cost_func_value)
const;
79 double getSelfMotionMagnitude(
double current_cost_func_value)
const;
82 virtual double getCriticalValue()
const;
85 void calcDerivativeValue();
86 void calcPartialValues();
87 void calcPredictionValue();
88 double getActivationThresholdWithBuffer()
const;
101 template <
typename T_PARAMS,
typename PRIO = u
int32_t>
106 T_PARAMS constraint_params,
109 abs_delta_max_(
std::numeric_limits<double>::
max()),
110 abs_delta_min_(
std::numeric_limits<double>::
max()),
118 virtual std::string getTaskId()
const;
120 virtual void calculate();
121 virtual Eigen::MatrixXd getTaskJacobian()
const;
122 virtual Eigen::VectorXd getTaskDerivatives()
const;
124 virtual double getActivationGain()
const;
125 virtual double getSelfMotionMagnitude(
const Eigen::MatrixXd& particular_solution,
const Eigen::MatrixXd& homogeneous_solution)
const;
129 void calcDerivativeValue();
130 void calcPartialValues();
141 template <
typename T_PARAMS,
typename PRIO = u
int32_t>
146 T_PARAMS constraint_params,
154 virtual std::string getTaskId()
const;
156 virtual void calculate();
158 virtual double getActivationGain()
const;
159 virtual double getSelfMotionMagnitude(
const Eigen::MatrixXd& particular_solution,
const Eigen::MatrixXd& homogeneous_solution)
const;
163 void calcDerivativeValue();
164 void calcPartialValues();
170 template <
typename T_PARAMS,
typename PRIO = u
int32_t>
175 T_PARAMS constraint_params,
178 abs_delta_max_(
std::numeric_limits<double>::
max()),
179 abs_delta_min_(
std::numeric_limits<double>::
max()),
187 virtual std::string getTaskId()
const;
188 virtual Eigen::MatrixXd getTaskJacobian()
const;
189 virtual Eigen::VectorXd getTaskDerivatives()
const;
191 virtual void calculate();
193 virtual double getActivationGain()
const;
194 virtual double getSelfMotionMagnitude(
const Eigen::MatrixXd& particular_solution,
const Eigen::MatrixXd& homogeneous_solution)
const;
198 void calcDerivativeValue();
199 void calcPartialValues();
212 #endif // COB_TWIST_CONTROLLER_CONSTRAINTS_CONSTRAINT_H KDL::ChainJntToJacSolver & jnt_to_jac_
Class providing a static method to create constraints.
JointLimitAvoidance(PRIO prio, T_PARAMS constraint_params, CallbackDataMediator &cbdm)
virtual ~JointLimitAvoidance()
Class providing methods that realize a JointLimitAvoidance constraint based on inequalities.
static std::set< ConstraintBase_t > createConstraints(const TwistControllerParams ¶ms, const LimiterParams &limiter_params, KDL::ChainJntToJacSolver &jnt_to_jac_, KDL::ChainFkSolverVel_recursive &fk_solver_vel, CallbackDataMediator &data_mediator)
ConstraintsBuilder< uint32_t > ConstraintsBuilder_t
virtual ~JointLimitAvoidanceIneq()
CollisionAvoidance(PRIO prio, T_PARAMS constraint_params, CallbackDataMediator &cbdm, KDL::ChainJntToJacSolver &jnt_to_jac, KDL::ChainFkSolverVel_recursive &fk_solver_vel)
Eigen::MatrixXd task_jacobian_
virtual ~CollisionAvoidance()
KDL::ChainFkSolverVel_recursive & fk_solver_vel_
JointLimitAvoidanceMid(PRIO prio, T_PARAMS constraint_params, CallbackDataMediator &cbdm)
Class providing methods that realize a JointLimitAvoidance constraint.
virtual ~JointLimitAvoidanceMid()
Class providing methods that realize a CollisionAvoidance constraint.
JointLimitAvoidanceIneq(PRIO prio, T_PARAMS constraint_params, CallbackDataMediator &cbdm)
Class providing methods that realize a JointLimitAvoidanceMid constraint.
double max(double a, double b)
Eigen::VectorXd derivative_values_