ORCA: Optimization-based framework for Robotic Control Applications
TaskState.h
Go to the documentation of this file.
1 //| This file is a part of the ORCA framework.
2 //|
3 //| Copyright 2018, Fuzzy Logic Robotics
4 //| Copyright 2017, ISIR / Universite Pierre et Marie Curie (UPMC)
5 //|
6 //| Main contributor(s): Antoine Hoarau, Ryan Lober, and
7 //| Fuzzy Logic Robotics <info@fuzzylogicrobotics.com>
8 //|
9 //| ORCA is a whole-body reactive controller framework for robotics.
10 //|
11 //| This software is governed by the CeCILL-C license under French law and
12 //| abiding by the rules of distribution of free software. You can use,
13 //| modify and/ or redistribute the software under the terms of the CeCILL-C
14 //| license as circulated by CEA, CNRS and INRIA at the following URL
15 //| "http://www.cecill.info".
16 //|
17 //| As a counterpart to the access to the source code and rights to copy,
18 //| modify and redistribute granted by the license, users are provided only
19 //| with a limited warranty and the software's author, the holder of the
20 //| economic rights, and the successive licensors have only limited
21 //| liability.
22 //|
23 //| In this respect, the user's attention is drawn to the risks associated
24 //| with loading, using, modifying and/or developing or reproducing the
25 //| software by the user in light of its specific status of free software,
26 //| that may mean that it is complicated to manipulate, and that also
27 //| therefore means that it is reserved for developers and experienced
28 //| professionals having in-depth computer knowledge. Users are therefore
29 //| encouraged to load and test the software's suitability as regards their
30 //| requirements in conditions enabling the security of their systems and/or
31 //| data to be ensured and, more generally, to use and operate it in the
32 //| same conditions as regards security.
33 //|
34 //| The fact that you are presently reading this means that you have had
35 //| knowledge of the CeCILL-C license and that you accept its terms.
36 
37 #pragma once
38 
39 #include <Eigen/Core>
41 
42 namespace orca
43 {
44 namespace common
45 {
46  struct TaskState
47  {
48  std::string name;
50 
51  struct Frames
52  {
53  std::string base_frame;
54  std::string control_frame;
55  }
56  Frames frames;
57 
58  struct State
59  {
62  double update_time;
63  double dt;
64  double weight;
65  }
66  State state;
67 
68  struct Maths
69  {
70  int rows;
71  int cols;
72 
73  Eigen::MatrixXd selection_matrix;
74  Eigen::MatrixXd Weight;
75 
76  Eigen::MatrixXd E;
77  Eigen::VectorXd f;
78  Eigen::MatrixXd Hessian;
79  Eigen::MatrixXd Gradient;
80 
81  Eigen::VectorXd lower_bound;
82  Eigen::VectorXd upper_bound;
83  Eigen::MatrixXd constraint_matrix;
84  }
85  Maths maths;
86 
87  struct Current
88  {
89  Eigen::VectorXd joint_position;
90  Eigen::VectorXd joint_velocity;
91 
92  Eigen::VectorXd control_frame_position;
93  Eigen::VectorXd control_frame_velocity;
94 
95  Eigen::VectorXd wrench_value;
96  Eigen::MatrixXd wrench_jacobian;
97  }
99 
100  struct Error
101  {
102  Eigen::VectorXd joint_error;
103 
104  Eigen::VectorXd control_frame_error;
105 
106  Eigen::VectorXd wrench_error;
107  }
108  Error error;
109 
110  struct PID
111  {
112  Eigen::VectorXd P;
113  Eigen::VectorXd I;
114  Eigen::VectorXd windup_limit;
115  Eigen::VectorXd D;
116 
117  }
118  PID pid;
119  };
120 } // namespace common
121 } // namespace orca
Definition: TaskState.h:58
Definition: TaskState.h:51
Eigen::VectorXd D
Definition: TaskState.h:115
Definition: TaskState.h:46
Eigen::VectorXd wrench_error
Definition: TaskState.h:106
Eigen::MatrixXd wrench_jacobian
Definition: TaskState.h:96
std::string control_frame
Definition: TaskState.h:54
Eigen::MatrixXd selection_matrix
Definition: TaskState.h:73
int cols
Definition: TaskState.h:71
struct orca::common::TaskState::Maths maths
Eigen::VectorXd P
Definition: TaskState.h:112
Eigen::VectorXd I
Definition: TaskState.h:113
Definition: TaskState.h:68
struct orca::common::TaskState::Frames frames
struct orca::common::TaskState::Current current
std::string base_frame
Definition: TaskState.h:53
Eigen::VectorXd control_frame_error
Definition: TaskState.h:104
Eigen::VectorXd upper_bound
Definition: TaskState.h:82
struct orca::common::TaskState::State state
Definition: TaskState.h:110
double update_time
Definition: TaskState.h:62
Eigen::VectorXd control_frame_velocity
Definition: TaskState.h:93
Eigen::VectorXd control_frame_position
Definition: TaskState.h:92
bool is_activated
Definition: TaskState.h:61
Eigen::VectorXd joint_error
Definition: TaskState.h:102
Eigen::VectorXd joint_position
Definition: TaskState.h:89
std::string name
Definition: TaskState.h:48
Eigen::MatrixXd Gradient
Definition: TaskState.h:79
Eigen::MatrixXd E
Definition: TaskState.h:76
Definition: TaskState.h:87
struct orca::common::TaskState::Error error
Definition: TaskState.h:100
Definition: CartesianAccelerationPID.h:44
double weight
Definition: TaskState.h:64
struct orca::common::TaskState::PID pid
ControlVariable
Definition: ControlVariable.h:44
Eigen::MatrixXd Hessian
Definition: TaskState.h:78
Eigen::VectorXd wrench_value
Definition: TaskState.h:95
ControlVariable control_variable
Definition: TaskState.h:49
Eigen::VectorXd f
Definition: TaskState.h:77
Eigen::VectorXd lower_bound
Definition: TaskState.h:81
Eigen::VectorXd windup_limit
Definition: TaskState.h:114
double dt
Definition: TaskState.h:63
Eigen::MatrixXd Weight
Definition: TaskState.h:74
bool is_initialized
Definition: TaskState.h:60
Eigen::VectorXd joint_velocity
Definition: TaskState.h:90
Eigen::MatrixXd constraint_matrix
Definition: TaskState.h:83
int rows
Definition: TaskState.h:70