wbc
TaskConfig.hpp
Go to the documentation of this file.
1#ifndef TASK_CONFIG_HPP
2#define TASK_CONFIG_HPP
3
4#include <string>
5#include <vector>
6#include <stdexcept>
7
8namespace wbc{
9
17enum TaskType{unset = -1,
18 jnt = 0,
19 cart = 1,
20 com = 2};
21
40
41public:
42 TaskConfig();
44 TaskConfig(const std::string &name,
45 const int priority,
46 const std::string root,
47 const std::string tip,
48 const std::string ref_frame,
49 const double activation = 0,
50 const std::vector<double> weights = {1,1,1,1,1,1},
51 const double timeout = 0);
53 TaskConfig(const std::string &name,
54 const int priority,
55 const std::vector<std::string> joint_names,
56 const std::vector<double> weights,
57 const double activation = 0,
58 const double timeout = 0);
60 TaskConfig(const std::string &name,
61 const int priority,
62 const std::vector<double> weights = {1,1,1},
63 const double activation = 0,
64 const double timeout = 0);
66
68 std::string name;
69
72
75
81 std::vector<double> weights;
82
85 double activation;
86
89 double timeout;
90
92 std::vector<std::string> joint_names;
93
96 std::string root;
97
100 std::string tip;
101
105 std::string ref_frame;
106
108 void validate() const;
109
111 unsigned int nVariables() const;
112};
113
114}
115
116#endif
Defines a task in the whole body control problem. Valid Configurations are e.g.
Definition TaskConfig.hpp:39
std::string name
Definition TaskConfig.hpp:68
unsigned int nVariables() const
Definition TaskConfig.cpp:112
std::string tip
Definition TaskConfig.hpp:100
TaskType type
Definition TaskConfig.hpp:71
std::vector< double > weights
Definition TaskConfig.hpp:81
std::string ref_frame
Definition TaskConfig.hpp:105
~TaskConfig()
Definition TaskConfig.cpp:61
TaskConfig()
Definition TaskConfig.cpp:6
int priority
Definition TaskConfig.hpp:74
double timeout
Definition TaskConfig.hpp:89
double activation
Definition TaskConfig.hpp:85
void validate() const
Definition TaskConfig.cpp:64
std::string root
Definition TaskConfig.hpp:96
std::vector< std::string > joint_names
Definition TaskConfig.hpp:92
Definition ContactsAccelerationConstraint.cpp:3
TaskType
Definition TaskConfig.hpp:17
@ jnt
Definition TaskConfig.hpp:18
@ cart
Definition TaskConfig.hpp:19
@ com
Definition TaskConfig.hpp:20
@ unset
Definition TaskConfig.hpp:17