BipedalLocomotion::Contacts::SchmittTriggerDetector class

Schmitt Trigger thresholding based contact detector that maintains and updates the contact states for a prescribed set of contacts.

Base classes

class ContactDetector

Constructors, destructors, conversion operators

SchmittTriggerDetector()
Constructor.
~SchmittTriggerDetector()
Destructor.

Public functions

auto initialize(std::weak_ptr<const ParametersHandler::IParametersHandler> handler) -> bool override
Initialize the SchmittTriggerDetector with a parameters handler.
auto setTimedTriggerInput(const std::string& contactName, const Math::SchmittTriggerInput& input) -> bool
Set trigger input and time stamp for an existing SchmittTrigger unit.
auto setTimedTriggerInputs(const std::unordered_map<std::string, Math::SchmittTriggerInput>& timedInputs) -> bool
Set trigger input and time stamp for existing units.
auto addContact(const std::string& contactName, const BipedalLocomotion::Math::SchmittTriggerState& initialState, const BipedalLocomotion::Math::SchmittTrigger::Params& params) -> bool
Add a contact whose contact state need to be tracked.
auto resetState(const std::string& contactName, const bool& state) -> bool
Reset a contact's state.
auto resetContact(const std::string& contactName, const bool state, const BipedalLocomotion::Math::SchmittTrigger::Params& params) -> bool
Reset a contact's parameters.
auto removeContact(const std::string& contactName) -> bool
Remove contact from the Detector.
auto advance() -> bool final
Compute one step of the detector.

Function documentation

BipedalLocomotion::Contacts::SchmittTriggerDetector::SchmittTriggerDetector()

Constructor.

It is required by the pimpl idiom.

BipedalLocomotion::Contacts::SchmittTriggerDetector::~SchmittTriggerDetector()

Destructor.

It is required by the pimpl idiom.

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

Initialize the SchmittTriggerDetector with a parameters handler.

Parameters
handler in configure the custom parameters for the detector.
Returns True in case of success, false otherwise.

bool BipedalLocomotion::Contacts::SchmittTriggerDetector::setTimedTriggerInput(const std::string& contactName, const Math::SchmittTriggerInput& input)

Set trigger input and time stamp for an existing SchmittTrigger unit.

Parameters
contactName in name of the contact
input in the imput of the trigger containing the contact force and the time instant
Returns True in case of success, false otherwise.

bool BipedalLocomotion::Contacts::SchmittTriggerDetector::setTimedTriggerInputs(const std::unordered_map<std::string, Math::SchmittTriggerInput>& timedInputs)

Set trigger input and time stamp for existing units.

Parameters
timedInputs in container of timed trigger inputs, pair(first, second): (time, force)
Returns True in case of success, false otherwise.

bool BipedalLocomotion::Contacts::SchmittTriggerDetector::addContact(const std::string& contactName, const BipedalLocomotion::Math::SchmittTriggerState& initialState, const BipedalLocomotion::Math::SchmittTrigger::Params& params)

Add a contact whose contact state need to be tracked.

Parameters
contactName in name of the contact
initialState in initial contact state
params in Schmitt Trigger parameters
Returns True in case of success, false otherwise.

bool BipedalLocomotion::Contacts::SchmittTriggerDetector::resetState(const std::string& contactName, const bool& state)

Reset a contact's state.

Parameters
contactName in name of the contact
state
Returns True in case of success, false if contact does not exist/otherwise.

bool BipedalLocomotion::Contacts::SchmittTriggerDetector::resetContact(const std::string& contactName, const bool state, const BipedalLocomotion::Math::SchmittTrigger::Params& params)

Reset a contact's parameters.

Parameters
contactName in name of the contact
state
params in Schmitt Trigger parameters
Returns True in case of success, false if contact does not exist/otherwise.

bool BipedalLocomotion::Contacts::SchmittTriggerDetector::removeContact(const std::string& contactName)

Remove contact from the Detector.

Parameters
contactName in name of the contact
Returns True in case of success, false if does not exist/otherwise.

bool BipedalLocomotion::Contacts::SchmittTriggerDetector::advance() final

Compute one step of the detector.

Returns True in case of success, false otherwise.

This method uses all the inputs and evaluate the contact status considering the Schmitt trigger output.