|
| PID (const PIDParams &prm=PIDParams{}) noexcept |
| Create a PID controller. More...
|
|
| PID (const PID &)=default |
| Default copy constructor.
|
|
| PID (PID &&)=default |
| Default move constructor.
|
|
PID & | operator= (const PID &)=default |
| Default copy assignment.
|
|
PID & | operator= (PID &&)=default |
| Default move assignment.
|
|
| ~PID ()=default |
| Default destructor.
|
|
Tangent< G > | operator() (const T &t, const G &x, const Tangent< G > &v) |
| Calculate control input. More...
|
|
void | set_kp (double kp) |
| Set all proportional gains to kp. More...
|
|
template<typename Derived > |
void | set_kp (const Eigen::MatrixBase< Derived > &kp) |
| Set proportional gains. More...
|
|
void | set_kd (double kd) |
| Set all derivative gains to kd. More...
|
|
template<typename Derived > |
void | set_kd (const Eigen::MatrixBase< Derived > &kd) |
| Set derivative gains. More...
|
|
void | set_ki (double ki) |
| Set all integral gains to ki. More...
|
|
template<typename Derived > |
void | set_ki (const Eigen::MatrixBase< Derived > &ki) |
| Set derivative gains. More...
|
|
void | reset_integral () |
| Reset integral state to zero. More...
|
|
template<int K> |
void | set_xdes (T t0, const smooth::Spline< K, G > &c) |
| Set desired trajectory as a smooth::Spline. More...
|
|
template<int K> |
void | set_xdes (T t0, smooth::Spline< K, G > &&c) |
| Set desired trajectory as a smooth::Spline (rvalue version) More...
|
|
void | set_xdes (const std::function< TrajectoryReturnT(T)> &f) |
| Set desired trajectory. More...
|
|
void | set_xdes (std::function< TrajectoryReturnT(T)> &&f) |
| Set desired trajectory (rvalue version). More...
|
|
template<Time T, LieGroup G>
requires (Dof<G> > 0)
class smooth::feedback::PID< T, G >
Proportional-Integral-Derivative controller for Lie groups.
- Template Parameters
-
T | Time type |
G | LieGroup state space type |
This controller is designed for a system
\[
\begin{aligned}
\mathrm{d}^r \mathbf{x}_t & = \mathbf{v}, \quad \mathbf{x} \in \mathbb{G}, \mathbf{v} \in
\mathbb{R}^{\dim \mathbb{G}} \\ \frac{\mathrm{d}}{\mathrm{d}t} {\mathbf{v}} & = \mathbf{u}, \quad
\mathbf{u} \in \mathbb{R}^{\dim \mathbb{G}} \end{aligned} \]
i.e. the input is the body acceleration.
Definition at line 39 of file pid.hpp.
template<Time T, LieGroup G>
Set desired trajectory.
The trajectory is a function from time to (position, velocity, acceleration). To track a time-dependent trajectory consider using smooth::Spline
and set_xdes(T, const
smooth::Spline<K, G> &) to set the desired trajectory.
For a constant reference target the velocity and acceleration should be constantly zero.
- Note
- For best performance the trajectory should be dynamically consistent, i.e.
\[
\mathrm{d}^r \mathbf{x}_t = \mathbf{v}, \\
\frac{\mathrm{d}}{\mathrm{d}t} \mathbf{v} = \mathbf{a},
\]
where (x, v, a) is the (position, velocity, acceleration)-tuple returned by the trajectory.
Definition at line 177 of file pid.hpp.