dynamicgraph::sot::FeaturePosture Class Reference

#include <feature-posture.hh>

Inheritance diagram for dynamicgraph::sot::FeaturePosture:

List of all members.

Public Types

typedef
dynamicgraph::SignalPtr
< dg::Vector, int > 
signalIn_t
typedef
dynamicgraph::SignalTimeDependent
< dg::Vector, int > 
signalOut_t

Public Member Functions

 FeaturePosture (const std::string &name)
virtual ~FeaturePosture ()
virtual unsigned int & getDimension (unsigned int &res, int)
 Verbose method.
void setPosture (const dg::Vector &posture)
void selectDof (unsigned dofId, bool control)

Public Attributes

 DECLARE_NO_REFERENCE

Protected Member Functions

virtual dg::VectorcomputeError (dg::Vector &res, int)
 Compute the error between the desired feature and the current value of the feature measured or deduced from the robot state.
virtual dg::MatrixcomputeJacobian (dg::Matrix &res, int)
 Compute the Jacobian of the error according the robot state.
virtual dg::VectorcomputeActivation (dg::Vector &res, int)

Protected Attributes

signalIn_t state_
signalIn_t posture_
signalOut_t error_
dg::Matrix jacobian_

Friends

class SelectDof

Detailed Description

Feature that observes the posture of the robot, ie whose Jacobian is the identity, or slices of the identity. This feature can be exactly obtained with a generic posture, given the identity matrix as the input Jacobian, the identity matrix. It is even prefereable, as the reference value is then given by a signal, which can be reevalutated at each iteration, for example to track a reference trajectory in the configuration space. See for example the toFlag python function in the sot-dyninv module to nicely selec the posture DOF.


Member Typedef Documentation


Constructor & Destructor Documentation

dynamicgraph::sot::FeaturePosture::FeaturePosture ( const std::string &  name) [explicit]
virtual dynamicgraph::sot::FeaturePosture::~FeaturePosture ( ) [virtual]

Member Function Documentation

virtual dg::Vector& dynamicgraph::sot::FeaturePosture::computeActivation ( dg::Vector res,
int   
) [protected, virtual]
virtual dg::Vector& dynamicgraph::sot::FeaturePosture::computeError ( dg::Vector res,
int  time 
) [protected, virtual]

Compute the error between the desired feature and the current value of the feature measured or deduced from the robot state.

[out] res: The error will be set into res.
[in] time: The time at which the error is computed.
Returns:
The vector res with the appropriate value.

Implements dynamicgraph::sot::FeatureAbstract.

virtual dg::Matrix& dynamicgraph::sot::FeaturePosture::computeJacobian ( dg::Matrix res,
int  time 
) [protected, virtual]

Compute the Jacobian of the error according the robot state.

[out] res: The matrix in which the error will be written.
Returns:
The matrix res with the appropriate values.

Implements dynamicgraph::sot::FeatureAbstract.

virtual unsigned int& dynamicgraph::sot::FeaturePosture::getDimension ( unsigned int &  res,
int  time 
) [virtual]

Verbose method.

res: The integer in which the dimension will be return.
time: The time at which the feature should be considered.
Returns:
Dimension of the feature.
Note:
Be careful with features changing their dimension according to time.

Implements dynamicgraph::sot::FeatureAbstract.

void dynamicgraph::sot::FeaturePosture::selectDof ( unsigned  dofId,
bool  control 
)
void dynamicgraph::sot::FeaturePosture::setPosture ( const dg::Vector posture)

Friends And Related Function Documentation

friend class SelectDof [friend]

Member Data Documentation