class
GlobalCoPEvaluatorGlobalCoPEvaluator is a class that computes the global CoP given a set of contact wrenches.
Following P. Sardain and G. Bessonnet, "Forces acting on a biped robot. Center of pressure-zero moment point," in IEEE Transactions on Systems, Man, and Cybernetics, we defined the global CoP as the weighted average of the CoP of each contact, with the weight determined by the normal force of the contact. In detail, given contacts, with , the global CoP is defined as
where is the global CoP expressed in the inertial frame , is the z component of the contact force expressed in the inertial frame , is the CoP of the -th contact expressed in the inertial frame . The local CoP can be computed as follows
where is the contact position in the inertial frame , is the rotation matrix from the inertial frame to the contact frame , and is the CoP of the -th contact expressed in the contact frame that can be computed as follows
with and being the x and y component of the moment of the contact wrench expressed in the contact frame .
Base classes
-
template<class _Input, class _Output>class BipedalLocomotion::System::Advanceable<std::vector<Contacts::ContactWrench>, Eigen::Vector3d>
- Basic class that represents a discrete system.
Public functions
-
auto initialize(std::weak_ptr<const ParametersHandler::
IParametersHandler> handler) -> bool override - Initialize the class.
-
auto setInput(const std::initializer_list<Contacts::
ContactWrench>& input) -> bool - Set the input to the class.
-
auto setInput(const std::vector<Contacts::
ContactWrench>& input) -> bool override - Set the input to the class.
- auto advance() -> bool override
- Compute the global CoP.
- auto isOutputValid() const -> bool override
- Check if the CoP evaluated by the class is valid.
- auto getOutput() const -> const Eigen::Vector3d& override
- Get the global CoP.
Function documentation
bool BipedalLocomotion:: Contacts:: GlobalCoPEvaluator:: initialize(std::weak_ptr<const ParametersHandler:: IParametersHandler> handler) override
Initialize the class.
Parameters | |
---|---|
handler | pointer to a parameter handler |
Returns | true in case of success, false otherwise. |
bool BipedalLocomotion:: Contacts:: GlobalCoPEvaluator:: setInput(const std::initializer_list<Contacts:: ContactWrench>& input)
Set the input to the class.
Parameters | |
---|---|
input | list containing the contact wrench |
Returns | true in case of success and false otherwise |
bool BipedalLocomotion:: Contacts:: GlobalCoPEvaluator:: setInput(const std::vector<Contacts:: ContactWrench>& input) override
Set the input to the class.
Parameters | |
---|---|
input | list containing the contact wrench |
Returns | true in case of success and false otherwise |
bool BipedalLocomotion:: Contacts:: GlobalCoPEvaluator:: advance() override
Compute the global CoP.
Returns | true in case of success and false otherwise |
---|
bool BipedalLocomotion:: Contacts:: GlobalCoPEvaluator:: isOutputValid() const override
Check if the CoP evaluated by the class is valid.
Returns | true if valid, false otherwise. |
---|
const Eigen::Vector3d& BipedalLocomotion:: Contacts:: GlobalCoPEvaluator:: getOutput() const override
Get the global CoP.
Returns | a 3D vector containing the position of the global CoP expressed respect to the global (inertial) frame. |
---|