humoto
task_fixarms.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 arms
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  TaskFixArms() : TaskIB0("TaskFixArms")
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(10);
43 
44  I[0] = loc_var.offset_ + ModelDescription<t_features>::LShoulderPitch;
45  I[1] = loc_var.offset_ + ModelDescription<t_features>::LShoulderRoll ;
46  I[2] = loc_var.offset_ + ModelDescription<t_features>::LElbowYaw ;
47  I[3] = loc_var.offset_ + ModelDescription<t_features>::LElbowRoll ;
48  I[4] = loc_var.offset_ + ModelDescription<t_features>::LWristYaw ;
49 
50  I[5] = loc_var.offset_ + ModelDescription<t_features>::RShoulderPitch;
51  I[6] = loc_var.offset_ + ModelDescription<t_features>::RShoulderRoll ;
52  I[7] = loc_var.offset_ + ModelDescription<t_features>::RElbowYaw ;
53  I[8] = loc_var.offset_ + ModelDescription<t_features>::RElbowRoll ;
54  I[9] = loc_var.offset_ + ModelDescription<t_features>::RWristYaw ;
55  }
56  };
57  } //pepper
58 } //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
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
Location getSolutionPartLocation(const std::string &id) const
Get location of a data in the solution vector.
Definition: solution.h:122
void form(const humoto::SolutionStructure &sol_structure, const humoto::Model &model_base, const humoto::ControlProblem &control_problem)
Form the task.
Definition: task_fixarms.h:34
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
Prevents motion of arms.
Definition: task_fixarms.h:20
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