21 #define HUMOTO_CONFIG_ENTRIES \ 22 HUMOTO_CONFIG_PARENT_CLASS(TaskAB) \ 23 HUMOTO_CONFIG_SCALAR_(k_orientation_gain) 24 #include HUMOTO_CONFIG_DEFINE_ACCESSORS 34 const double k_orientation_gain) :
TaskAB(id, gain)
36 k_orientation_gain_ = k_orientation_gain;
43 k_orientation_gain_ = 0.0;
56 const std::string &name =
"task")
const 60 logger.log(
LogEntryName(subname).add(
"k_orientation_gain"), k_orientation_gain_);
69 template <
int t_features>
76 k_orientation_gain) {}
90 Eigen::MatrixXd &A = getA();
91 Eigen::VectorXd &b = getB();
93 model.getBaseOrientationJacobian(A);
95 b.noalias() = k_orientation_gain_
97 model.getBaseOrientation(),
114 #ifdef HUMOTO_DOXYGEN_PROCESSING 129 k_orientation_gain) {}
143 Eigen::MatrixXd &A = getA();
144 Eigen::VectorXd &b = getB();
147 model.getBaseOrientationJacobian(J);
151 b(0) = k_orientation_gain_
154 model.getBaseOrientation(),
Abstract base class (for control problems)
void form(const humoto::SolutionStructure &sol_structure, const humoto::Model &model_base, const humoto::ControlProblem &control_problem)
Form the task.
TaskBaseOrientation(const double gain=1.0, const double k_orientation_gain=1.0)
virtual void logTask(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="task") const
Log task.
#define HUMOTO_GLOBAL_LOGGER_IF_DEFINED
double k_orientation_gain_
Analog of 'sol_structure' struct in Octave code. [determine_solution_structure.m].
virtual void setDefaults()
Set members to their default values.
Represents log entry name.
TaskBaseOrientation(const double gain=1.0, const double k_orientation_gain=1.0)
etools::Vector3 getRotationErrorAngleAxis(const etools::Matrix3 ¤t, const etools::Matrix3 &reference)
Threaded logger: any data sent to this logger is wrapped in a message and pushed to a queue...
The root namespace of HuMoTo.
humoto::pepper_ik::MotionParameters motion_parameters_
TaskBaseOrientationBase(const std::string &id, const double gain, const double k_orientation_gain)
Instances of this class are passed to a virtual method 'humoto::TaskBase::form()', so even though this class is basically useless in its present form we cannot avoid its definition using a template.
virtual void setDefaults()
Set members to their default values.
virtual void logTask(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="task") const
Log task.
LogEntryName & add(const char *name)
extends entry name with a subname
bool isApproximatelyEqual(const double var1, const double var2, const double tol=humoto::g_generic_tolerance)
Returns true if the difference between two given variables is below the given tolerance.
void form(const humoto::SolutionStructure &sol_structure, const humoto::Model &model_base, const humoto::ControlProblem &control_problem)
Form the task.
etools::Matrix3 convertEulerAnglesToMatrix(const etools::Vector3 &euler_angles, const EulerAngles::Type euler_angles_type)
Convert rotation matrix to Euler angles.
etools::Vector3 base_orientation_rpy_