SCL
1.0
Standard Control Library : Control, dynamics, physics, and simulation
|
#include <CControllerGc.hpp>
Public Member Functions | |
CControllerGc () | |
virtual | ~CControllerGc () |
virtual sBool | computeControlForces () |
virtual sBool | computeKinematics () |
virtual sBool | computeDynamics () |
virtual sBool | computeNonControlOperations () |
virtual const Eigen::VectorXd * | getControlForces () |
virtual sBool | init (SControllerBase *arg_data, scl::CDynamicsBase *arg_dynamics) |
virtual sBool | reset () |
virtual sBool | hasBeenInit () |
sBool | computeControlForcesPD () |
sBool | computeControlForcesPIDA (const sFloat arg_time) |
sBool | computeFloatForces () |
Protected Attributes | |
SControllerGc * | data_ |
sBool | has_been_init_ |
CDynamicsBase * | dynamics_ |
A generic generalized coordinate space force controller.
Requires set points for position and velocity. Optionally, can also use acceleration set points and can introduce integral gain.
This controller's advantage is its simplicity. It's disadvantage is that it is usually hard trajectories in the generalized coordinates. Moreover, for redundant robots, such trajectories are energy sub-optimal and require controlling motor task null spaces, which may be superfluous.
scl::CControllerGc::CControllerGc | ( | ) |
The constructor does nothing
|
virtual |
The destructor does nothing
|
virtual |
[PDA] : Computes generalized coordinate forces. Uses position, velocity and acceleration set points and gains.
Does not use integral gain by default. To get an integral gain controller look at computeControlForcesPIDA()
Implements scl::CControllerBase.
sBool scl::CControllerGc::computeControlForcesPD | ( | ) |
[PD] : Dynamic decoupling + PD controller on decoupled closed loop system in the generalized coordinates.
Does not include acceleration set points or integral gain.
[PIDA] : Dynamic decoupling + PIDA controller on decoupled closed loop system in the generalized coordinates.
Includes acceleration set points and integral gain.
Implements the following 1st order, infinite time horizon integrator: Force = Force + ki * pos_err * (t_curr - t_pre);
arg_time : The current time. Required to compute integral gain term.
|
virtual |
Computes the dynamic model : Mass, MassInv, centrifugal/coriolis, gravity
Following Khatib's convention : A and Ainv matrices + b and g vectors
Implements scl::CControllerBase.
sBool scl::CControllerGc::computeFloatForces | ( | ) |
Controller that only compensates for gravity: Gravity compensation + damping
|
inlinevirtual |
Computes the kinematic model : Jacobian
This function does nothing in GcControllers. For the curious : The jacobian for a generalized coordinate force controllers is the identity matrix
|
inlinevirtual |
Support for non control computations in the controller. This is really basic controller and does nothing here. Subclasses might consider adding stuff to this function..
Implements scl::CControllerBase.
|
virtual |
Returns the current control forces
|
inlinevirtual |
Whether the controller has been attached to a robot or not
Reimplemented from scl::CControllerBase.
|
virtual |
Whether the controller has been initialized to a particular robot
Implements scl::CControllerBase.
|
virtual |
Reset the controller (set it to execute a different behavior perhaps)
Implements scl::CControllerBase.