humoto
task_basejerkminimization.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  {
17  /**
18  * @brief base jerk minimization task
19  */
21  {
22  public:
23  explicit TaskBaseJerkMinimization(const double gain = 0.707106781186548)
24  : TaskASB("TaskBaseJerkMinimization", gain)
25  {
26  }
27 
28 
29  /// @copydoc humoto::TaskBase::form
30  void form( const humoto::SolutionStructure &sol_structure,
31  const humoto::Model &model_base,
32  const humoto::ControlProblem &control_problem)
33  {
34  const humoto::pepper_mpc::MPCforMG &mpc = dynamic_cast <const humoto::pepper_mpc::MPCforMG&>(control_problem);
35 
36  Eigen::MatrixXd &A = getA();
37  Eigen::VectorXd &b = getB();
38 
39  setOffset(0);
40 
41  A.noalias() = getGain()*mpc.Ajs_;
42  b.noalias() = -getGain()*mpc.sjs_;
43  }
44  };
45  }//pepper
46 }//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
Task: A*S*x = b.
Definition: task.h:554
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
TaskBaseJerkMinimization(const double gain=0.707106781186548)
Eigen::MatrixXd Ajs_
Definition: mpc_mg.h:361
Eigen::VectorXd sjs_
Definition: mpc_mg.h:360