This class implements the Stack of Task. It allows to deal with the priority of the controllers through the shell. The controllers can be either constraints either tasks. More...
#include <sot/core/sot.hh>
Public Types | |
typedef std::list< TaskAbstract * > | StackType |
Defines a type for a list of tasks. More... | |
![]() | |
typedef std::map< std::string, SignalBase< int > * > | SignalMap |
typedef std::map< const std::string, command::Command * > | CommandMap_t |
Public Member Functions | |
virtual const std::string & | getClassName () const |
Returns the name of this class. More... | |
Sot (const std::string &name) | |
Default constructor. More... | |
~Sot (void) | |
virtual 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. More... | |
virtual void | defineNbDof (const unsigned int &nbDof) |
virtual const unsigned int & | getNbDof () const |
virtual std::ostream & | writeGraph (std::ostream &os) const |
This method write the priority between tasks in the output stream os. More... | |
Methods to handle the stack. | |
virtual const StackType & | tasks () const |
virtual 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. More... | |
virtual TaskAbstract & | pop (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. More... | |
virtual bool | exist (const TaskAbstract &task) |
This method allows to know if a task exists or not. More... | |
virtual 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. More... | |
virtual void | removeDependency (const TaskAbstract &key) |
This method removes the output signals depending on this task. More... | |
virtual void | up (const TaskAbstract &task) |
This method makes the task to swap with the task having the immediate superior priority. More... | |
virtual void | down (const TaskAbstract &task) |
This method makes the task to swap with the task having the immediate inferior priority. More... | |
virtual void | clear (void) |
Remove all the tasks from the stack. More... | |
Methods to handle the constraints. | |
virtual void | addConstraint (Constraint &constraint) |
Add a constraint to the stack with the current level of priority. More... | |
virtual void | removeConstraint (const Constraint &constraint) |
Remove a constraint from the stack. More... | |
virtual void | clearConstraint (void) |
Remove all the constraints from the stack. More... | |
Methods to compute the control law following the | |
recursive definition of the stack of tasks. | |
virtual dg::Vector & | computeControlLaw (dg::Vector &control, const int &time) |
Compute the control law. More... | |
virtual dg::Matrix & | computeConstraintProjector (dg::Matrix &Proj, const int &time) |
Compute the projector of the constraint. More... | |
![]() | |
Entity (const std::string &name) | |
virtual | ~Entity () |
const std::string & | getName () const |
virtual std::string | getDocString () const |
bool | hasSignal (const std::string &signame) const |
SignalBase< int > & | getSignal (const std::string &signalName) |
const SignalBase< int > & | getSignal (const std::string &signalName) const |
std::ostream & | displaySignalList (std::ostream &os) const |
virtual std::ostream & | writeCompletionList (std::ostream &os) const |
virtual SignalBase< int > * | test () |
virtual void | test2 (SignalBase< int > *) |
const std::string & | getCommandList () const |
CommandMap_t | getNewStyleCommandMap () |
command::Command * | getNewStyleCommand (const std::string &cmdName) |
SignalMap | getSignalMap () const |
void | sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *file="", int line=0) |
void | setLoggerVerbosityLevel (LoggerVerbosity lv) |
LoggerVerbosity | getLoggerVerbosityLevel () |
Static Public Member Functions | |
static dg::Matrix & | computeJacobianConstrained (const dg::Matrix &Jac, const dg::Matrix &K, dg::Matrix &JK) |
Number of joints by default. More... | |
static dg::Matrix & | computeJacobianConstrained (const TaskAbstract &task, const dg::Matrix &K) |
static void | taskVectorToMlVector (const VectorMultiBound &taskVector, Vector &err) |
Public Attributes | |
Methods to handle signals | |
SignalPtr< dg::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). More... | |
SignalPtr< double, int > | inversionThresholdSIN |
This signal allow to change the threshold for the damped pseudo-inverse on-line. More... | |
SignalTimeDependent< dg::Matrix, int > | constraintSOUT |
Allow to get the result of the Constraint projector. More... | |
SignalTimeDependent< dg::Vector, int > | controlSOUT |
Allow to get the result of the computed control law. More... | |
Static Public Attributes | |
static const std::string | CLASS_NAME |
Specify the name of the class entity. More... | |
static const double | INVERSION_THRESHOLD_DEFAULT |
Threshold to compute the dumped pseudo inverse. More... | |
Protected Types | |
typedef std::list< Constraint * > | ConstraintListType |
Defines a type for a list of constraints. More... | |
Protected Attributes | |
StackType | stack |
This field is a list of controllers managed by the stack of tasks. More... | |
ConstraintListType | constraintList |
This field is a list of constraints managed by the stack of tasks. More... | |
unsigned int | ffJointIdFirst |
Defines an interval in the state vector of the robot which is the free flyer. More... | |
unsigned int | ffJointIdLast |
unsigned int | nbJoints |
Store the number of joints to be used in the command computed by the stack of tasks. More... | |
TaskAbstract * | taskGradient |
Store a pointer to compute the gradient. More... | |
bool | recomputeEachTime |
![]() | |
std::string | name |
SignalMap | signalMap |
CommandMap_t | commandMap |
Logger | logger_ |
Static Protected Attributes | |
static const unsigned int | FF_JOINT_ID_DEFAULT = 0 |
Defines a default joint. More... | |
Methods to display the stack of tasks. | |
virtual void | display (std::ostream &os) const |
SOTSOT_CORE_EXPORT friend std::ostream & | operator<< (std::ostream &os, const Sot &sot) |
Additional Inherited Members | |
![]() | |
void | addCommand (const std::string &name, command::Command *command) |
void | entityRegistration () |
void | entityDeregistration () |
void | signalRegistration (const SignalArray< int > &signals) |
void | signalDeregistration (const std::string &name) |
This class implements the Stack of Task. It allows to deal with the priority of the controllers through the shell. The controllers can be either constraints either tasks.
|
protected |
Defines a type for a list of constraints.
typedef std::list<TaskAbstract*> dynamicgraph::sot::Sot::StackType |
Defines a type for a list of tasks.
dynamicgraph::sot::Sot::Sot | ( | const std::string & | name | ) |
Default constructor.
|
inline |
|
virtual |
Add a constraint to the stack with the current level of priority.
|
virtual |
Remove all the tasks from the stack.
|
virtual |
Remove all the constraints from the stack.
|
virtual |
Compute the projector of the constraint.
|
virtual |
Compute the control law.
|
static |
Number of joints by default.
|
static |
|
virtual |
This method defines the part of the state vector which correspond to the free flyer of the robot.
|
virtual |
|
virtual |
Display the stack of tasks in text mode as a tree.
Reimplemented from dynamicgraph::Entity.
|
virtual |
This method makes the task to swap with the task having the immediate inferior priority.
|
virtual |
This method allows to know if a task exists or not.
|
inlinevirtual |
Returns the name of this class.
Reimplemented from dynamicgraph::Entity.
|
inlinevirtual |
References dynamicgraph::sot::operator<<(), and SOTSOT_CORE_EXPORT.
|
virtual |
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.
|
virtual |
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.
|
virtual |
Remove a task regardless to its position in the stack. It removes also the signals connected to the output signal of this stack.
|
virtual |
Remove a constraint from the stack.
|
virtual |
This method removes the output signals depending on this task.
|
inlinevirtual |
|
static |
|
virtual |
This method makes the task to swap with the task having the immediate superior priority.
|
virtual |
This method write the priority between tasks in the output stream os.
Reimplemented from dynamicgraph::Entity.
|
friend |
Wrap the previous method around an operator.
|
static |
Specify the name of the class entity.
|
protected |
This field is a list of constraints managed by the stack of tasks.
SignalTimeDependent<dg::Matrix,int> dynamicgraph::sot::Sot::constraintSOUT |
Allow to get the result of the Constraint projector.
SignalTimeDependent<dg::Vector,int> dynamicgraph::sot::Sot::controlSOUT |
Allow to get the result of the computed control law.
|
staticprotected |
Defines a default joint.
|
protected |
Defines an interval in the state vector of the robot which is the free flyer.
|
protected |
|
static |
Threshold to compute the dumped pseudo inverse.
SignalPtr<double,int> dynamicgraph::sot::Sot::inversionThresholdSIN |
This signal allow to change the threshold for the damped pseudo-inverse on-line.
|
protected |
Store the number of joints to be used in the command computed by the stack of tasks.
SignalPtr<dg::Vector,int> dynamicgraph::sot::Sot::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).
|
protected |
Force the recomputation at each step.
|
protected |
This field is a list of controllers managed by the stack of tasks.
|
protected |
Store a pointer to compute the gradient.