SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
scl::CTaskOpPosPIDA1OrderInfTime Class Reference

#include <CTaskOpPosPIDA1OrderInfTime.hpp>

Inheritance diagram for scl::CTaskOpPosPIDA1OrderInfTime:
Inheritance graph
[legend]
Collaboration diagram for scl::CTaskOpPosPIDA1OrderInfTime:
Collaboration graph
[legend]

Public Member Functions

virtual bool computeServo (const SRobotSensors *arg_sensors)
 
virtual bool computeModel (const SRobotSensors *arg_sensors)
 
virtual STaskBasegetTaskData ()
 
virtual bool setGoalPos (const Eigen::VectorXd &arg_goal)
 
virtual bool setGoalVel (const Eigen::VectorXd &arg_goal)
 
virtual bool setGoalAcc (const Eigen::VectorXd &arg_goal)
 
virtual bool getGoalPos (Eigen::VectorXd &arg_goal) const
 
virtual bool getGoalVel (Eigen::VectorXd &arg_goal) const
 
virtual bool getGoalAcc (Eigen::VectorXd &arg_goal) const
 
virtual bool getPos (Eigen::VectorXd &arg_pos) const
 
virtual bool getVel (Eigen::VectorXd &arg_vel) const
 
virtual bool getAcc (Eigen::VectorXd &arg_acc) const
 
sBool achievedGoalPos ()
 
void setFlagComputeOpPosGravity (sBool arg_compute_grav)
 
sBool integralGainActive ()
 
 CTaskOpPosPIDA1OrderInfTime ()
 
virtual ~CTaskOpPosPIDA1OrderInfTime ()
 
virtual bool init (STaskBase *arg_task_data, CDynamicsBase *arg_dynamics)
 
virtual void reset ()
 
virtual sBool hasBeenInit ()
 
virtual sBool setActivated (sBool arg_activate)
 
virtual sBool hasBeenActivated ()
 

Protected Attributes

STaskOpPosPIDA1OrderInfTimedata_
 
Eigen::VectorXd tmp1
 
Eigen::VectorXd tmp2
 
Eigen::ColPivHouseholderQR
< Eigen::Matrix3d > 
qr_
 
sBool lambda_inv_singular_
 
Eigen::JacobiSVD< Eigen::Matrix3d > svd_
 
Eigen::Matrix3d singular_values_
 
sBool flag_compute_gravity_
 
sBool flag_integral_gain_active_
 
sBool has_been_init_
 
CDynamicsBasedynamics_
 

Detailed Description

Computes the operational space forces for a single 3-d (x,y,z) goal point Euclidean task

It computes:

  1. The task model (computes, mass, jacobian, inv jacobian, coriolis, centrifugal and gravity matrices/vectors).
  2. The task servo (computes the dynamically decoupled task forces and the torques. uses the task model to do so).

NOTE : This differs from the plain operational space controller in that it also incorporates integral gain. For many applications, integral gain is actually not desirable since it introduces a non-deterministic time-varying control signal to the equations. To make this work well, one might have to tune gains manually depending on the motor task involved.

Use with caution.

Constructor & Destructor Documentation

scl::CTaskOpPosPIDA1OrderInfTime::CTaskOpPosPIDA1OrderInfTime ( )

Default constructor : Does nothing

virtual scl::CTaskOpPosPIDA1OrderInfTime::~CTaskOpPosPIDA1OrderInfTime ( )
inlinevirtual

Default destructor : Does nothing.

Member Function Documentation

bool scl::CTaskOpPosPIDA1OrderInfTime::achievedGoalPos ( )

Whether the task has achieved its goal position.

bool scl::CTaskOpPosPIDA1OrderInfTime::computeModel ( const SRobotSensors arg_sensors)
virtual

Computes the dynamics (task model) Assumes that the data_->model_.gc_model_ has been updated.

Implements scl::CTaskBase.

bool scl::CTaskOpPosPIDA1OrderInfTime::computeServo ( const SRobotSensors arg_sensors)
virtual

Computes the task torques

Implements scl::CTaskBase.

virtual bool scl::CTaskOpPosPIDA1OrderInfTime::getAcc ( Eigen::VectorXd &  arg_acc) const
inlinevirtual

Gets the current acceleration. Returns false if not supported by task.

Reimplemented from scl::CTaskBase.

virtual bool scl::CTaskOpPosPIDA1OrderInfTime::getGoalAcc ( Eigen::VectorXd &  arg_goal) const
inlinevirtual

Gets the current goal acceleration. Returns false if not supported by task.

Reimplemented from scl::CTaskBase.

virtual bool scl::CTaskOpPosPIDA1OrderInfTime::getGoalPos ( Eigen::VectorXd &  arg_goal) const
inlinevirtual

Gets the current goal position. Returns false if not supported by task.

Reimplemented from scl::CTaskBase.

virtual bool scl::CTaskOpPosPIDA1OrderInfTime::getGoalVel ( Eigen::VectorXd &  arg_goal) const
inlinevirtual

Gets the current goal velocity. Returns false if not supported by task.

Reimplemented from scl::CTaskBase.

virtual bool scl::CTaskOpPosPIDA1OrderInfTime::getPos ( Eigen::VectorXd &  arg_pos) const
inlinevirtual

Gets the current position. Returns false if not supported by task.

Reimplemented from scl::CTaskBase.

STaskBase * scl::CTaskOpPosPIDA1OrderInfTime::getTaskData ( )
virtual

Return this task controller's task data structure.

Implements scl::CTaskBase.

virtual bool scl::CTaskOpPosPIDA1OrderInfTime::getVel ( Eigen::VectorXd &  arg_vel) const
inlinevirtual

Gets the current velocity. Returns false if not supported by task.

Reimplemented from scl::CTaskBase.

virtual sBool scl::CTaskBase::hasBeenActivated ( )
inlinevirtualinherited

Activated = All dynamic parameters and data structures are up to date and task is actively contributing to a controller.

virtual sBool scl::CTaskBase::hasBeenInit ( )
inlinevirtualinherited

Initialized = All static parameters are set and data structures are up to date. Ready to contribute to a controller.

bool scl::CTaskOpPosPIDA1OrderInfTime::init ( STaskBase arg_task_data,
CDynamicsBase arg_dynamics 
)
virtual

Initializes the task object. Required to set output gc force dofs

Implements scl::CTaskBase.

sBool scl::CTaskOpPosPIDA1OrderInfTime::integralGainActive ( )
inline

Whether the integral gain has activated.

void scl::CTaskOpPosPIDA1OrderInfTime::reset ( )
virtual

Resets the task by removing its data. NOTE : Does not deallocate its data structure

Implements scl::CTaskBase.

virtual sBool scl::CTaskBase::setActivated ( sBool  arg_activate)
inlinevirtualinherited

Activated = All dynamic parameters and data structures are up to date and task is actively contributing to a controller.

Set to true/false during runtime to activate/deactivate task.

Returns : success/failure

bool scl::CTaskOpPosPIDA1OrderInfTime::setGoalAcc ( const Eigen::VectorXd &  arg_goal)
virtual

Sets the current goal acceleration

Reimplemented from scl::CTaskBase.

bool scl::CTaskOpPosPIDA1OrderInfTime::setGoalPos ( const Eigen::VectorXd &  arg_goal)
virtual

Sets the current goal position

Reimplemented from scl::CTaskBase.

bool scl::CTaskOpPosPIDA1OrderInfTime::setGoalVel ( const Eigen::VectorXd &  arg_goal)
virtual

Sets the current goal velocity

Reimplemented from scl::CTaskBase.

Member Data Documentation

STaskOpPosPIDA1OrderInfTime* scl::CTaskOpPosPIDA1OrderInfTime::data_
protected

The actual data structure for this computational object

CDynamicsBase* scl::CTaskBase::dynamics_
protectedinherited

A Dynamics model required to compute the task's dynamics

sBool scl::CTaskBase::has_been_init_
protectedinherited

Initialized = All static parameters are set and data structures are up to date.

Set to true in init()

sBool scl::CTaskOpPosPIDA1OrderInfTime::lambda_inv_singular_
protected

True when the lambda_inv matrix turns singular.

Eigen::ColPivHouseholderQR<Eigen::Matrix3d> scl::CTaskOpPosPIDA1OrderInfTime::qr_
protected

For inverting the lambda matrix (when it gets singular)

Eigen::JacobiSVD<Eigen::Matrix3d > scl::CTaskOpPosPIDA1OrderInfTime::svd_
protected

For inverting the operational space inertia matrix near singularities. 3x3 for operational point tasks.

Eigen::VectorXd scl::CTaskOpPosPIDA1OrderInfTime::tmp1
protected

Temporary variables


The documentation for this class was generated from the following files: