Class LinearMomentum
Defined in File LinearMomentum.h
Inheritance Relationships
Base Type
public OpenSoT::Task< Eigen::MatrixXd, Eigen::VectorXd >
(Template Class Task)
Class Documentation
-
class LinearMomentum : public OpenSoT::Task<Eigen::MatrixXd, Eigen::VectorXd>
The LinearMomentum class implement the tracking of a desired linear momentum:
where \( \mathbf{h}_d \) is the desired linear momentum at the CoM\f$ \mathbf{A} \Delta \mathbf{q} = \mathbf{h}_d \text{dT} \f$
Note
This is basically a copy of Enrico Mingo’s AngularMomentum with one difference that it takes the linear part of centroidal momentum matrix.
Public Types
-
typedef std::shared_ptr<LinearMomentum> Ptr
Public Functions
-
LinearMomentum(XBot::ModelInterface &robot)
LinearMomentum constructor.
- Parameters
x – joint states
robot – reference to a model
-
~LinearMomentum()
-
void setReference(const Eigen::Vector3d &desiredLinearMomentum)
setReference set a desired linear momentum at CoM
- Parameters
desiredLinearMomentum – vector 3x1 NOTE: the input desired linear momentum has to be multiplied by \( \text{dT} \)!
-
void setReference(const KDL::Vector &desiredLinearMomentum)
-
void getReference(Eigen::Vector3d &desiredLinearMomentum) const
getReference get the desired linear momentum at CoM
- Parameters
desiredLinearMomentum – vector 3x1
-
void getReference(KDL::Vector &desiredLinearMomentum) const
-
std::string getBaseLink()
getBaseLink
- Returns
“world”
-
std::string getDistalLink()
getDistalLink
- Returns
“CoM”
Public Static Functions
-
static bool isLinearMomentum(OpenSoT::Task<Eigen::MatrixXd, Eigen::VectorXd>::TaskPtr task)
isLinearMomentum
- Parameters
task – a pointer to a Task
- Returns
true if the task is LinearMomentum
-
static OpenSoT::tasks::velocity::LinearMomentum::Ptr asLinearMomentum(OpenSoT::Task<Eigen::MatrixXd, Eigen::VectorXd>::TaskPtr task)
asLinearMomentum
- Parameters
task – a pointer to a Task
- Returns
a pointer to an LinearMomentum Task
-
typedef std::shared_ptr<LinearMomentum> Ptr