Class AngularMomentum
Defined in File AngularMomentum.h
Inheritance Relationships
Base Type
public OpenSoT::Task< Eigen::MatrixXd, Eigen::VectorXd >
(Template Class Task)
Class Documentation
-
class AngularMomentum : public OpenSoT::Task<Eigen::MatrixXd, Eigen::VectorXd>
The AngularMomentum class implements the tracking of desired angular momentum variation:
with:\f$\dot{L}_{r} = A\ddot{q} + \dot{A}\dot{q}\f$
\f$\dot{L}_{r} = \dot{L}_{d} + \lambda K \left( L_{d} - L \right)\f$
Public Types
-
typedef std::shared_ptr<AngularMomentum> Ptr
Public Functions
-
AngularMomentum(XBot::ModelInterface &robot, const AffineHelper &qddot)
AngularMomentum constructor.
- Parameters
robot – model
qddot – variable
-
~AngularMomentum()
~AngularMomentum destructor
-
void setReference(const Eigen::Vector3d &desiredAngularMomentum)
setReference set a desired angular momentum at CoM
- Parameters
desiredAngularMomentum – vector 3x1
-
void setReference(const Eigen::Vector3d &desiredAngularMomentum, const Eigen::Vector3d &desiredAngularMomentumVariation)
setReference set a desired angular momentum and variation of angular momentum at CoM
- Parameters
desiredAngularMomentum –
desiredAngularMomentumVariation –
-
void setMomentumGain(const Eigen::Matrix3d &K)
setMomentumGain set gain for momentum feedback law
- Parameters
K – matrix 3x3
-
const Eigen::Matrix3d &getMomentumGain() const
getMomentumGain retrieve internal momentum gain
- Returns
3x3 momentum gain matrix
-
void getReference(Eigen::Vector3d &desiredAngularMomentum) const
getReference get the desired angular momentum at CoM
- Parameters
desiredAngularMomentum – vector 3x1
-
void getReference(Eigen::Vector3d &desiredAngularMomentum, Eigen::Vector3d &desiredAngularMomentumVariation) const
getReference get the desired angular momentum and variation of angular momentum at CoM
- Parameters
desiredAngularMomentum – vector 3x1
desiredAngularMomentumVariation – vector 3x1
-
const std::string &getBaseLink() const
getBaseLink
- Returns
“world”
-
const std::string &getDistalLink() const
getDistalLink
- Returns
“CoM”
-
virtual bool reset()
reset position reference to actual, velcoity and accelration to 0
- Returns
true
Public Static Functions
-
static bool isAngularMomentum(OpenSoT::Task<Eigen::MatrixXd, Eigen::VectorXd>::TaskPtr task)
isAngularMomentum
- Parameters
task – a pointer to a Task
- Returns
true if the task is AngularMomentum
-
static OpenSoT::tasks::acceleration::AngularMomentum::Ptr asAngularMomentum(OpenSoT::Task<Eigen::MatrixXd, Eigen::VectorXd>::TaskPtr task)
asAngularMomentum
- Parameters
task – a pointer to a Task
- Returns
a pointer to an AngularMomentum Task
-
typedef std::shared_ptr<AngularMomentum> Ptr