mc_control::fsm::AddRemoveContactState Struct Reference

#include <mc_control/fsm/states/AddRemoveContact.h>

Inheritance diagram for mc_control::fsm::AddRemoveContactState:
Collaboration diagram for mc_control::fsm::AddRemoveContactState:

Public Member Functions

 AddRemoveContactState ()
 
virtual ~AddRemoveContactState ()
 
void start (Controller &) override
 
bool run (Controller &) override
 
void teardown (Controller &) override
 
- Public Member Functions inherited from mc_control::fsm::State
virtual ~State ()
 
void configure_ (const mc_rtc::Configuration &config)
 
void start_ (Controller &ctl)
 
void teardown_ (Controller &ctl)
 
virtual void stop (Controller &)
 
virtual bool read_msg (std::string &)
 
virtual bool read_write_msg (std::string &, std::string &)
 
const std::string & output () const noexcept
 
const std::string & name ()
 
void name (const std::string &n)
 

Protected Attributes

std::unique_ptr< AddRemoveContactStateImplimpl_
 
- Protected Attributes inherited from mc_control::fsm::State
mc_rtc::Configuration add_contacts_config_
 
mc_rtc::Configuration remove_contacts_config_
 
mc_rtc::Configuration add_contacts_after_config_
 
mc_rtc::Configuration remove_contacts_after_config_
 
mc_rtc::Configuration add_collisions_config_
 
mc_rtc::Configuration remove_collisions_config_
 
mc_rtc::Configuration add_collisions_after_config_
 
mc_rtc::Configuration remove_collisions_after_config_
 
mc_rtc::Configuration constraints_config_
 
mc_rtc::Configuration tasks_config_
 
mc_rtc::Configuration remove_posture_task_
 
mc_rtc::Configuration config_
 
std::vector< mc_solver::ConstraintSetPtrconstraints_
 
std::vector< std::pair< mc_tasks::MetaTaskPtr, mc_rtc::Configuration > > tasks_
 
std::vector< mc_tasks::PostureTaskPtrpostures_
 

Additional Inherited Members

- Protected Member Functions inherited from mc_control::fsm::State
void output (const std::string &o)
 
virtual void configure (const mc_rtc::Configuration &config)
 

Detailed Description

Implements a state that is able to remove or add a contact

General configuration options:

  • type (req.): one of ["addContact", "removeContact", "compliance"]
  • contact (req.): contact to be removed or added

Add contact options:

  • forceThreshold (def: infinity): if the body attempting the contact has a force sensor attached, monitor this sensor normal force to stop the motion before geometric contact

Remove contact options:

  • distance (def: 0.1): when the contact body has moved this distance away from the contact, the state is finished

Compliant add contact options:

  • velocity (def: 1e-4): velocity threshold for the ComplianceTask

Other options depend on the type of task used to add/remove the contact. For the compliance task, the "body" entry is overwritten based on the contact value.

If you use a compliance task to remove a contact that has no force sensor attached the state will automatically fallback to using an AddContactTask.

This state also employs a CoM task to keep the robot balanced during the removal/adding operation. The task can be configured using a "com" entry, two values can be specified:

  • weight (def: 100): the weight of the CoM task
  • stiffness (def: 2): the stiffness of the CoM task

Constructor & Destructor Documentation

◆ AddRemoveContactState()

mc_control::fsm::AddRemoveContactState::AddRemoveContactState ( )

◆ ~AddRemoveContactState()

virtual mc_control::fsm::AddRemoveContactState::~AddRemoveContactState ( )
virtual

Member Function Documentation

◆ run()

bool mc_control::fsm::AddRemoveContactState::run ( Controller ctl)
overridevirtual

Called every iteration until it returns true

Implements mc_control::fsm::State.

◆ start()

void mc_control::fsm::AddRemoveContactState::start ( Controller ctl)
overridevirtual

Called before the state starts being run

This will be called only once with the state fully configured.

Implements mc_control::fsm::State.

◆ teardown()

void mc_control::fsm::AddRemoveContactState::teardown ( Controller ctl)
overridevirtual

Called right before destruction

Implements mc_control::fsm::State.

Member Data Documentation

◆ impl_

std::unique_ptr<AddRemoveContactStateImpl> mc_control::fsm::AddRemoveContactState::impl_
protected

The documentation for this struct was generated from the following file: