19 template <
int t_features>
22 #define HUMOTO_CONFIG_ENTRIES \ 23 HUMOTO_CONFIG_PARENT_CLASS(TaskAB) \ 24 HUMOTO_CONFIG_SCALAR_(k_angular_velocity_gain) \ 25 HUMOTO_CONFIG_SCALAR_(tag_string_id) 26 #include HUMOTO_CONFIG_DEFINE_ACCESSORS 40 k_angular_velocity_gain_ = 0.0;
53 const std::string &name =
"task")
const 57 logger.log(
LogEntryName(subname).add(
"k_angular_velocity_gain"), k_angular_velocity_gain_);
58 logger.log(
LogEntryName(subname).add(
"tag_string_id"), tag_string_id_);
64 const double gain = 1.0,
65 const double k_angular_velocity_gain = 1.0)
66 :
TaskAB(
std::string(
"TaskTagAngularVelocity_") + tag_string_id, gain)
68 k_angular_velocity_gain_ = k_angular_velocity_gain;
69 tag_string_id_ = tag_string_id;
89 Eigen::MatrixXd &A = getA();
90 Eigen::VectorXd &b = getB();
94 b.noalias() = k_angular_velocity_gain_ *
95 wb_controller.getTagVelocityInGlobal(model, tag_string_id_,
boost::shared_ptr< const TagLink > TagLinkPtr
Abstract base class (for control problems)
std::string tag_string_id_
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.
virtual void logTask(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="task") const
Log task.
#define HUMOTO_GLOBAL_LOGGER_IF_DEFINED
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.
TaskTagAngularVelocity(const std::string &tag_string_id="", const double gain=1.0, const double k_angular_velocity_gain=1.0)
Threaded logger: any data sent to this logger is wrapped in a message and pushed to a queue...
The root namespace of HuMoTo.
double k_angular_velocity_gain_
rbdl::TagLinkPtr getLinkTag(const std::string &id) const
Get tag.
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.
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.
void getTagOrientationJacobian(Eigen::MatrixXd &jacobian, const rbdl::TagLinkPtr tag) const
Get tag orientation Jacobian.