19 template <
int t_features>
22 #define HUMOTO_CONFIG_ENTRIES \ 23 HUMOTO_CONFIG_PARENT_CLASS(TaskAB) \ 24 HUMOTO_CONFIG_SCALAR_(k_complete_velocity_gain) \ 25 HUMOTO_CONFIG_SCALAR_(tag_string_id) 26 #include HUMOTO_CONFIG_DEFINE_ACCESSORS 40 k_complete_velocity_gain_ = 0.0;
53 const std::string &name =
"task")
const 57 logger.log(
LogEntryName(subname).add(
"k_complete_velocity_gain"), k_complete_velocity_gain_);
58 logger.log(
LogEntryName(subname).add(
"tag_string_id"), tag_string_id_);
64 const double gain = 1.0,
65 const double k_complete_velocity_gain = 1.0)
66 :
TaskAB(
std::string(
"TaskTagCompleteVelocity_") + tag_string_id, gain)
68 k_complete_velocity_gain_ = k_complete_velocity_gain;
69 tag_string_id_ = tag_string_id;
89 Eigen::MatrixXd &A = getA();
90 Eigen::VectorXd &b = getB();
94 b.noalias() = k_complete_velocity_gain_ *
95 wb_controller.getTagVelocityInGlobal(model, tag_string_id_,
boost::shared_ptr< const TagLink > TagLinkPtr
Abstract base class (for control problems)
virtual void logTask(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="task") const
Log task.
TaskTagCompleteVelocity(const std::string &tag_string_id="", const double gain=1.0, const double k_complete_velocity_gain=1.0)
std::string tag_string_id_
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.
void getTagCompleteJacobian(Eigen::MatrixXd &jacobian, const rbdl::TagLinkPtr tag) const
Get tag complete Jacobian.
Tag complete velocity (translational and rotational)
Threaded logger: any data sent to this logger is wrapped in a message and pushed to a queue...
virtual void setDefaults()
Set members to their default values.
The root namespace of HuMoTo.
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.
void form(const humoto::SolutionStructure &sol_structure, const humoto::Model &model_base, const humoto::ControlProblem &control_problem)
Form the 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.
double k_complete_velocity_gain_