mc_control::fsm::MetaState Struct Reference

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

Inheritance diagram for mc_control::fsm::MetaState:
Collaboration diagram for mc_control::fsm::MetaState:

Public Member Functions

void start (Controller &) override
 
bool run (Controller &) override
 
void stop (Controller &) override
 
void teardown (Controller &) override
 
bool read_msg (std::string &msg) override
 
std::vector< std::vector< std::string > > transitions () const
 
std::map< std::string, mc_rtc::Configurationconfigs () const
 
- 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 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

Executor executor_
 
- 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 "meta" state

This states plays its own FSM.

Configuration entries:

  • Managed: if true, does not handle transitions
  • StepByStep: same as FSM for the internal FSM (default: false)
  • transitions: a transition map, similiar to the FSM controller (required if Managed is false)
  • category: an arrray of strings, dictates where the executor adds elements into the GUI
  • configs: can contain additional configuration for the states in the FSM

Member Function Documentation

◆ configs()

std::map<std::string, mc_rtc::Configuration> mc_control::fsm::MetaState::configs ( ) const

◆ read_msg()

bool mc_control::fsm::MetaState::read_msg ( std::string &  )
overridevirtual

Handle read service call

Reimplemented from mc_control::fsm::State.

◆ run()

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

Called every iteration until it returns true

Implements mc_control::fsm::State.

◆ start()

void mc_control::fsm::MetaState::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.

◆ stop()

void mc_control::fsm::MetaState::stop ( Controller )
overridevirtual

Called if the state is interrupted

Reimplemented from mc_control::fsm::State.

◆ teardown()

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

Called right before destruction

Implements mc_control::fsm::State.

◆ transitions()

std::vector<std::vector<std::string> > mc_control::fsm::MetaState::transitions ( ) const

Member Data Documentation

◆ executor_

Executor mc_control::fsm::MetaState::executor_
protected

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