wbc
PosPDController.hpp
Go to the documentation of this file.
1#ifndef POS_PD_CONTROLLER
2#define POS_PD_CONTROLLER
3
4#include <base/Eigen.hpp>
5
6namespace wbc {
7
25protected:
27 base::VectorXd p_gain;
28 base::VectorXd d_gain;
29 base::VectorXd ff_gain;
30 base::VectorXd dead_zone;
31 base::VectorXd max_control_output;
32 base::VectorXd ref_pos, ref_vel, ref_acc;
33 base::VectorXd pos, vel, acc;
34 base::VectorXd pos_diff, vel_diff;
36
37public:
39
42 void update();
44 void setPGain(const base::VectorXd &gain);
46 const base::VectorXd& pGain(){return p_gain;}
48 void setDGain(const base::VectorXd &gain);
50 const base::VectorXd& dGain(){return d_gain;}
52 void setFFGain(const base::VectorXd &gain);
54 const base::VectorXd& ffGain(){return ff_gain;}
56 void setMaxCtrlOutput(const base::VectorXd &max_ctrl_out);
58 const base::VectorXd& maxCtrlOutput(){return max_control_output;}
60 void setDeadZone(const base::VectorXd &dz);
62 const base::VectorXd& deadZone(){return dead_zone;}
64 base::VectorXd getControlError(){return pos_diff;}
73 void applySaturation(const base::VectorXd& in, const base::VectorXd& max, base::VectorXd &out);
87 void applyDeadZone(const base::VectorXd& in, const base::VectorXd& min, base::VectorXd& out);
88};
89}
90
91#endif
The PosPDController class implements the following two control scemes.
Definition PosPDController.hpp:24
base::VectorXd pos_diff
Definition PosPDController.hpp:34
base::VectorXd ff_gain
Definition PosPDController.hpp:29
PosPDController(size_t dim_controller)
Definition PosPDController.cpp:5
base::VectorXd control_out_acc
Definition PosPDController.hpp:35
void applySaturation(const base::VectorXd &in, const base::VectorXd &max, base::VectorXd &out)
Apply Saturation on the control output. If one or more values of <in> are bigger than the Corrrespond...
Definition PosPDController.cpp:107
const base::VectorXd & maxCtrlOutput()
Definition PosPDController.hpp:58
const base::VectorXd & deadZone()
Definition PosPDController.hpp:62
void setDeadZone(const base::VectorXd &dz)
Definition PosPDController.cpp:98
void applyDeadZone(const base::VectorXd &in, const base::VectorXd &min, base::VectorXd &out)
Apply dead zone, i.e. minimum position control error. If one of the input value falls below minimum,...
Definition PosPDController.cpp:115
base::VectorXd ref_acc
Definition PosPDController.hpp:32
base::VectorXd pos
Definition PosPDController.hpp:33
base::VectorXd dead_zone
Definition PosPDController.hpp:30
const base::VectorXd & ffGain()
Definition PosPDController.hpp:54
base::VectorXd d_gain
Definition PosPDController.hpp:28
void setDGain(const base::VectorXd &gain)
Definition PosPDController.cpp:70
void setFFGain(const base::VectorXd &gain)
Definition PosPDController.cpp:79
void setPGain(const base::VectorXd &gain)
Definition PosPDController.cpp:61
base::VectorXd ref_vel
Definition PosPDController.hpp:32
void setMaxCtrlOutput(const base::VectorXd &max_ctrl_out)
Definition PosPDController.cpp:89
base::VectorXd p_gain
Definition PosPDController.hpp:27
base::VectorXd vel_diff
Definition PosPDController.hpp:34
const base::VectorXd & pGain()
Definition PosPDController.hpp:46
size_t dim_controller
Definition PosPDController.hpp:26
base::VectorXd control_out_vel
Definition PosPDController.hpp:35
base::VectorXd max_control_output
Definition PosPDController.hpp:31
base::VectorXd ref_pos
Definition PosPDController.hpp:32
const base::VectorXd & dGain()
Definition PosPDController.hpp:50
void update()
Definition PosPDController.cpp:25
base::VectorXd acc
Definition PosPDController.hpp:33
base::VectorXd getControlError()
Definition PosPDController.hpp:64
base::VectorXd vel
Definition PosPDController.hpp:33
Definition ContactsAccelerationConstraint.cpp:3