humoto
task_bodypositionref.h
Go to the documentation of this file.
1 /**
2  @file
3  @author Jan Michalczyk
4  @author Alexander Sherikov
5  @copyright 2014-2017 INRIA. Licensed under the Apache License, Version 2.0.
6  (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
7 
8  @brief
9 */
10 
11 #pragma once
12 
13 namespace humoto
14 {
15  namespace pepper_mpc
16  {
18  {
19  public:
20  explicit TaskBodyPositionReference(const double gain = 0.707106781186548)
21  : TaskAB("TaskBodyPositionReference", gain)
22  {
23  }
24 
25 
26  /// @copydoc humoto::TaskBase::form
27  void form( const humoto::SolutionStructure &sol_structure,
28  const humoto::Model &model_base,
29  const humoto::ControlProblem &control_problem)
30  {
31  const humoto::pepper_mpc::MPCforMG &mpc = dynamic_cast <const humoto::pepper_mpc::MPCforMG &> (control_problem);
32 
33  Eigen::MatrixXd &A = getA();
34  Eigen::VectorXd &b = getB();
35 
36  A.noalias() = getGain()*mpc.Apd_;
37  b.noalias() = getGain()*mpc.spd_;
38  }
39  };
40  }//pepper
41 }//humoto
Abstract base class (for control problems)
#define HUMOTO_LOCAL
Definition: export_import.h:26
void form(const humoto::SolutionStructure &sol_structure, const humoto::Model &model_base, const humoto::ControlProblem &control_problem)
Form the task.
Analog of &#39;sol_structure&#39; struct in Octave code. [determine_solution_structure.m].
Definition: solution.h:33
Eigen::MatrixXd Apd_
Definition: mpc_mg.h:357
TaskBodyPositionReference(const double gain=0.707106781186548)
Eigen::VectorXd spd_
Definition: mpc_mg.h:356
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
Model Predictive Control problem for walking pattern generation [determine_solution_structure.m, form_rotation_matrices.m, form_foot_pos_matrices.m, form_condensing_matrices.m].
Definition: mpc_mg.h:20
Task: A*x = b.
Definition: task.h:542