wbc
PotentialFieldsController.hpp
Go to the documentation of this file.
1#ifndef POTENTIAL_FIELDS_CONTROLLER_HPP
2#define POTENTIAL_FIELDS_CONTROLLER_HPP
3
5#include <vector>
6
7namespace wbc{
8
13protected:
15 std::vector<PotentialFieldPtr> fields;
16 std::vector<PotentialFieldInfo> field_infos;
18
19public:
20 PotentialFieldsController(const uint _dimension);
28 void applySaturation(const base::VectorXd& in, base::VectorXd &out);
30 void setFields(const std::vector<PotentialFieldPtr>& _fields);
32 std::vector<PotentialFieldInfo> getFieldInfos();
34 void clearFields(){fields.clear();}
36 void setPGain(const base::VectorXd& gain);
38 void setMaxControlOutput(const base::VectorXd& new_max_control_output);
40 base::VectorXd getMaxControlOutput(){return max_ctrl_output;}
42 base::VectorXd getPGain(){return p_gain;}
44 const std::vector<PotentialFieldPtr> &getFields(){return fields;}
46 uint getDimension(){return dimension;}
47};
48
49}
50
51#endif
52
53
Base class for potential field controllers.
Definition PotentialFieldsController.hpp:12
const std::vector< PotentialFieldPtr > & getFields()
Definition PotentialFieldsController.hpp:44
void setPGain(const base::VectorXd &gain)
Definition PotentialFieldsController.cpp:39
uint getDimension()
Definition PotentialFieldsController.hpp:46
base::VectorXd p_gain
Definition PotentialFieldsController.hpp:14
base::VectorXd getMaxControlOutput()
Definition PotentialFieldsController.hpp:40
uint dimension
Definition PotentialFieldsController.hpp:17
base::VectorXd max_ctrl_output
Definition PotentialFieldsController.hpp:14
std::vector< PotentialFieldInfo > getFieldInfos()
Definition PotentialFieldsController.cpp:51
base::VectorXd control_output
Definition PotentialFieldsController.hpp:14
void clearFields()
Definition PotentialFieldsController.hpp:34
PotentialFieldsController(const uint _dimension)
Definition PotentialFieldsController.cpp:8
void setMaxControlOutput(const base::VectorXd &new_max_control_output)
Definition PotentialFieldsController.cpp:45
void setFields(const std::vector< PotentialFieldPtr > &_fields)
Definition PotentialFieldsController.cpp:16
std::vector< PotentialFieldInfo > field_infos
Definition PotentialFieldsController.hpp:16
void applySaturation(const base::VectorXd &in, base::VectorXd &out)
Apply Saturation on the control output. If one or more values of <in> are bigger than the Corrrespond...
Definition PotentialFieldsController.cpp:27
std::vector< PotentialFieldPtr > fields
Definition PotentialFieldsController.hpp:15
base::VectorXd getPGain()
Definition PotentialFieldsController.hpp:42
Definition ContactsAccelerationConstraint.cpp:3