dynamicgraph::sot::SotQr Class Reference

#include <sot/core/sot-qr.hh>

Inheritance diagram for dynamicgraph::sot::SotQr:
dynamicgraph::Entity noncopyable

List of all members.

Public Member Functions

virtual const std::string & getClassName (void) const
 Returns the name of this class.
 SotQr (const std::string &name)
 Default constructor.
void defineFreeFloatingJoints (const unsigned int &jointIdFirst, const unsigned int &jointIdLast=-1)
 This method defines the part of the state vector which correspond to the free flyer of the robot.
virtual void commandLine (const std::string &cmdLine, std::istringstream &cmdArgs, std::ostream &os)
 This method deals with the command line. The command given in argument is send to the stack of tasks by the shell. The command understood by sot are:
virtual std::ostream & writeGraph (std::ostream &os) const
 This method write the priority between tasks in the output stream os.
Methods to handle the stack.
void push (TaskAbstract &task)
 Push the task in the stack. It has a lowest priority than the previous ones. If this is the first task, then it has the highest priority.
TaskAbstractpop (void)
 Pop the task from the stack. This method removes the task with the smallest priority in the task. The other are projected in the null-space of their predecessors.
bool exist (const TaskAbstract &task)
 This method allows to know if a task exists or not.
void remove (const TaskAbstract &task)
 Remove a task regardless to its position in the stack. It removes also the signals connected to the output signal of this stack.
void removeDependency (const TaskAbstract &key)
 This method removes the output signals depending on this task.
void up (const TaskAbstract &task)
 This method makes the task to swap with the task having the immediate superior priority.
void down (const TaskAbstract &task)
 This method makes the task to swap with the task having the immediate inferior priority.
void clear (void)
 Remove all the tasks from the stack.
Methods to handle the constraints.
void addConstraint (Constraint &constraint)
 Add a constraint to the stack with the current level of priority.
void removeConstraint (const Constraint &constraint)
 Remove a constraint from the stack.
void clearConstraint (void)
 Remove all the constraints from the stack.
Methods to compute the control law following the

recursive definition of the stack of tasks.

ml::VectorcomputeControlLaw (ml::Vector &control, const int &time)
 Compute the control law.
ml::MatrixcomputeConstraintProjector (ml::Matrix &Proj, const int &time)
 Compute the projector of the constraint.

Public Attributes

Methods to handle signals
dg::SignalPtr< ml::Vector, int > q0SIN
 Intrinsec velocity of the robot, that is used to initialized the recurence of the SOT (e.g. velocity comming from the other OpenHRP plugins).
dg::SignalPtr< double, int > inversionThresholdSIN
 This signal allow to change the threshold for the damped pseudo-inverse on-line.
dg::SignalTimeDependent
< ml::Matrix, int > 
constraintSOUT
 This signal allow to get the result of the Constraint projector.
dg::SignalTimeDependent
< ml::Vector, int > 
controlSOUT
 This signal allow to get the result of the computed control law.

Static Public Attributes

static const std::string CLASS_NAME
 Specify the name of the class entity.
static const double INVERSION_THRESHOLD_DEFAULT
 Threshold to compute the dumped pseudo inverse.
static const unsigned int NB_JOINTS_DEFAULT
 Number of joints by default.

Protected Types

typedef std::list< TaskAbstract * > StackType
 Defines a type for a list of tasks.
typedef std::list< Constraint * > ConstraintListType
 Defines a type for a list of constraints.

Protected Attributes

StackType stack
 This field is a list of controllers managed by the stack of tasks.
ConstraintListType constraintList
 This field is a list of constraints managed by the stack of tasks.
unsigned int ffJointIdFirst
 Defines an interval in the state vector of the robot which is the free flyer.
unsigned int ffJointIdLast
unsigned int nbJoints
 Store the number of joints to be used in the command computed by the stack of tasks.
TaskAbstracttaskGradient
 Store a pointer to compute the gradient.
ml::Matrix Proj

Static Protected Attributes

static const unsigned int FF_JOINT_ID_DEFAULT = 0
 Defines a default joint.

Methods to display the stack of tasks.

virtual void display (std::ostream &os) const
SOTSOTQR_EXPORT friend
std::ostream & 
operator<< (std::ostream &os, const SotQr &sot)

Member Typedef Documentation

Defines a type for a list of constraints.

typedef std::list<TaskAbstract*> dynamicgraph::sot::SotQr::StackType [protected]

Defines a type for a list of tasks.


Constructor & Destructor Documentation

dynamicgraph::sot::SotQr::SotQr ( const std::string &  name)

Default constructor.


Member Function Documentation

Add a constraint to the stack with the current level of priority.

Remove all the tasks from the stack.

Remove all the constraints from the stack.

virtual void dynamicgraph::sot::SotQr::commandLine ( const std::string &  cmdLine,
std::istringstream &  cmdArgs,
std::ostream &  os 
) [virtual]

This method deals with the command line. The command given in argument is send to the stack of tasks by the shell. The command understood by sot are:

  • Tasks
    • push <task> : Push a task in the stack (FILO).
    • pop : Remove the task push in the stack.
    • down <task> : Make the task have a higher priority, i.e. swap with the task immediatly superior in priority.
    • up <task> : Make the task have a lowest priority, i.e. swap with the task immediatly inferior in priority.
    • rm <task> : Remove the task from the stack.
  • Constraints
    • addConstraint <constraint> : Add the constraint in the stack (FILO).
    • rmConstraint <constraint> : Remove the constraint.
    • clearConstraint : Remove all the constraints.
    • printConstraint :

Reimplemented from dynamicgraph::Entity.

Compute the projector of the constraint.

ml::Vector& dynamicgraph::sot::SotQr::computeControlLaw ( ml::Vector control,
const int &  time 
)

Compute the control law.

void dynamicgraph::sot::SotQr::defineFreeFloatingJoints ( const unsigned int &  jointIdFirst,
const unsigned int &  jointIdLast = -1 
)

This method defines the part of the state vector which correspond to the free flyer of the robot.

virtual void dynamicgraph::sot::SotQr::display ( std::ostream &  os) const [virtual]

Display the stack of tasks in text mode as a tree.

Reimplemented from dynamicgraph::Entity.

This method makes the task to swap with the task having the immediate inferior priority.

This method allows to know if a task exists or not.

virtual const std::string& dynamicgraph::sot::SotQr::getClassName ( void  ) const [inline, virtual]

Returns the name of this class.

Implements dynamicgraph::Entity.

Pop the task from the stack. This method removes the task with the smallest priority in the task. The other are projected in the null-space of their predecessors.

Push the task in the stack. It has a lowest priority than the previous ones. If this is the first task, then it has the highest priority.

Remove a task regardless to its position in the stack. It removes also the signals connected to the output signal of this stack.

Remove a constraint from the stack.

This method removes the output signals depending on this task.

This method makes the task to swap with the task having the immediate superior priority.

virtual std::ostream& dynamicgraph::sot::SotQr::writeGraph ( std::ostream &  os) const [virtual]

This method write the priority between tasks in the output stream os.

Reimplemented from dynamicgraph::Entity.


Friends And Related Function Documentation

SOTSOTQR_EXPORT friend std::ostream& operator<< ( std::ostream &  os,
const SotQr sot 
) [friend]

Wrap the previous method around an operator.


Member Data Documentation

const std::string dynamicgraph::sot::SotQr::CLASS_NAME [static]

Specify the name of the class entity.

This field is a list of constraints managed by the stack of tasks.

This signal allow to get the result of the Constraint projector.

This signal allow to get the result of the computed control law.

const unsigned int dynamicgraph::sot::SotQr::FF_JOINT_ID_DEFAULT = 0 [static, protected]

Defines a default joint.

unsigned int dynamicgraph::sot::SotQr::ffJointIdFirst [protected]

Defines an interval in the state vector of the robot which is the free flyer.

unsigned int dynamicgraph::sot::SotQr::ffJointIdLast [protected]

Threshold to compute the dumped pseudo inverse.

This signal allow to change the threshold for the damped pseudo-inverse on-line.

const unsigned int dynamicgraph::sot::SotQr::NB_JOINTS_DEFAULT [static]

Number of joints by default.

unsigned int dynamicgraph::sot::SotQr::nbJoints [protected]

Store the number of joints to be used in the command computed by the stack of tasks.

Projection used to compute the control law.

Intrinsec velocity of the robot, that is used to initialized the recurence of the SOT (e.g. velocity comming from the other OpenHRP plugins).

This field is a list of controllers managed by the stack of tasks.

Store a pointer to compute the gradient.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines