21 template <
int t_features>
32 #define HUMOTO_CONFIG_ENTRIES \ 33 HUMOTO_CONFIG_PARENT_CLASS(TaskAB) \ 34 HUMOTO_CONFIG_SCALAR_(k_pose_gain) \ 35 HUMOTO_CONFIG_SCALAR_(tag_string_id) 36 #include HUMOTO_CONFIG_DEFINE_ACCESSORS 55 const std::string &name =
"task")
const 59 logger.log(
LogEntryName(subname).add(
"k_pose_gain"), k_pose_gain_);
60 logger.log(
LogEntryName(subname).add(
"tag_string_id"), tag_string_id_);
66 const double gain = 1.0,
67 const double k_pose_gain = 1.0)
68 :
TaskAB(
std::string(
"TaskTagPose3Dof_") + tag_string_id, gain)
70 k_pose_gain_ = k_pose_gain;
71 tag_string_id_ = tag_string_id;
91 Eigen::MatrixXd &A = getA();
92 Eigen::VectorXd &b = getB();
96 b.noalias() = k_pose_gain_ * wb_controller.getTagPoseErrorInGlobal(model, tag_string_id_);
97 b.segment(2, 3) *= 0.0;
boost::shared_ptr< const TagLink > TagLinkPtr
Abstract base class (for control problems)
Tag pose with 3dofs (around x axis, around y axis, along z axis) This task is used when moving the ba...
virtual void logTask(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="task") const
Log task.
#define HUMOTO_GLOBAL_LOGGER_IF_DEFINED
virtual void logTask(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="task") const
Log task.
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.
std::string tag_string_id_
virtual void setDefaults()
Set members to their default values.
void getTagCompleteJacobian(Eigen::MatrixXd &jacobian, const rbdl::TagLinkPtr tag) const
Get tag complete Jacobian.
TaskTagPose3Dof(const std::string &tag_string_id="", const double gain=1.0, const double k_pose_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.
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.