BipedalLocomotion::Contacts::FixedFootDetector class

The FixedFootDetector is a class that can be used to find the fixed foot given a sequence of contacts.

The logic used to find the fixed foot is the follow:

  • In the single support phase the fixed foot is the stance foot
  • In the double support phase the fixed foot is the foot in switch off phase, where switch off is the transition phase between stance and swing.

The aforementioned logic is described by the following diagram

time         0   1   2   3   4   5   6   7   8   9   10  11  12  13  14  15  16  17
L            |+++|---|+++++++++++|---|+++++++++++|---|+++++++++++|---|+++++++++++|
R            |+++++++++++|---|+++++++++++|---|+++++++++++|---|+++++++++++|---|+++|
stance foot  |LLL|RRR|RRR|LLL|LLL|RRR|RRR|LLL|LLL|RRR|RRR|LLL|LLL|RRR|RRR|LLL|LLL|

Base classes

class ContactDetector

Public functions

auto initialize(std::weak_ptr<const ParametersHandler::IParametersHandler> handler) -> bool override
Initialize the detector.
auto advance() -> bool override
Update the contact state.
void setContactPhaseList(const ContactPhaseList& phaseList)
Set the contact phase list.
void resetTime(const std::chrono::nanoseconds& time)
Reset the time.
auto getFixedFoot() const -> const EstimatedContact&
Get the fixed foot.

Function documentation

bool BipedalLocomotion::Contacts::FixedFootDetector::initialize(std::weak_ptr<const ParametersHandler::IParametersHandler> handler) override

Initialize the detector.

Parameters
handler pointer to the parameter handler.
Returns true in case of success/false otherwise.

bool BipedalLocomotion::Contacts::FixedFootDetector::advance() override

Update the contact state.

Returns true in case of success/false otherwise.

This function advance the current time stored in the class.

void BipedalLocomotion::Contacts::FixedFootDetector::setContactPhaseList(const ContactPhaseList& phaseList)

Set the contact phase list.

Parameters
phaseList a contact phase list

void BipedalLocomotion::Contacts::FixedFootDetector::resetTime(const std::chrono::nanoseconds& time)

Reset the time.

Parameters
time time

const EstimatedContact& BipedalLocomotion::Contacts::FixedFootDetector::getFixedFoot() const

Get the fixed foot.

Returns the fixed foot.