humoto
task_fixhead.h
Go to the documentation of this file.
1 /**
2  @file
3  @author Alexander Sherikov
4  @copyright 2014-2017 INRIA. Licensed under the Apache License, Version 2.0.
5  (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
6 
7  @brief
8 */
9 
10 #pragma once
11 
12 namespace humoto
13 {
14  namespace pepper_ik
15  {
16  /**
17  * @brief Prevents motion of the head
18  */
19  template <int t_features>
21  {
22  #define HUMOTO_CONFIG_ENTRIES \
23  HUMOTO_CONFIG_PARENT_CLASS(TaskIB0)
24  #include HUMOTO_CONFIG_DEFINE_ACCESSORS
25 
26 
27  public:
28  TaskFixHead() : TaskIB0("TaskFixHead")
29  {
30  }
31 
32 
33  /// @copydoc humoto::TaskBase::form
34  void form( const humoto::SolutionStructure &sol_structure,
35  const humoto::Model &model_base,
36  const humoto::ControlProblem &control_problem)
37  {
39 
40  humoto::IndexVector &I = getIndices();
41 
42  I.resize(2);
43 
44  I[0] = loc_var.offset_ + ModelDescription<t_features>::HeadYaw;
45  I[1] = loc_var.offset_ + ModelDescription<t_features>::HeadPitch;
46  }
47  };
48  } //pepper
49 } //humoto
Abstract base class (for control problems)
static const char * JOINTS_VARIABLES_ID
Joint angles.
Definition: common.h:19
#define HUMOTO_LOCAL
Definition: export_import.h:26
Prevents motion of the head.
Definition: task_fixhead.h:20
Analog of &#39;sol_structure&#39; struct in Octave code. [determine_solution_structure.m].
Definition: solution.h:33
Eigen::Matrix< unsigned int, Eigen::Dynamic, 1 > IndexVector
Definition: utility.h:19
void form(const humoto::SolutionStructure &sol_structure, const humoto::Model &model_base, const humoto::ControlProblem &control_problem)
Form the task.
Definition: task_fixhead.h:34
Location getSolutionPartLocation(const std::string &id) const
Get location of a data in the solution vector.
Definition: solution.h:122
The root namespace of HuMoTo.
Definition: config.h:12
Instances of this class are passed to a virtual method &#39;humoto::TaskBase::form()&#39;, so even though this class is basically useless in its present form we cannot avoid its definition using a template.
Definition: model.h:41
Location of a data chunk (offset + length).
Definition: utility.h:146
Task: x[I] = 0.
Definition: task.h:580
std::size_t offset_
Definition: utility.h:149