MetaTasks.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2020 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
8 #include <mc_control/fsm/State.h>
9 #include <mc_tasks/MetaTask.h>
10 
11 namespace mc_control
12 {
13 
14 namespace fsm
15 {
16 
100 {
101  void configure(const mc_rtc::Configuration & config) override;
102 
103  void start(Controller &) override;
104 
105  bool run(Controller &) override;
106 
107  void teardown(Controller &) override;
108 
109 protected:
111  std::vector<std::string> outputCrit_;
114  {
115  // Index of the task in tasks_ vector
116  size_t idx{0};
117  // Completion criteria
119  // Whether this criteria appears in the output
120  bool use_output{false};
121  };
123  std::map<std::string, TaskCriteria> criterias_;
125  bool finished_first_ = false;
126 };
127 
128 } // namespace fsm
129 
130 } // namespace mc_control
mc_rtc::Configuration
Simplify access to values hold within a JSON file.
Definition: Configuration.h:165
mc_control::fsm::MetaTasksState::outputCrit_
std::vector< std::string > outputCrit_
Definition: MetaTasks.h:111
mc_control::fsm::MetaTasksState::TaskCriteria
Definition: MetaTasks.h:113
mc_control::fsm::MetaTasksState::TaskCriteria::criteria
mc_control::CompletionCriteria criteria
Definition: MetaTasks.h:118
mc_control::fsm::MetaTasksState::criterias_
std::map< std::string, TaskCriteria > criterias_
Definition: MetaTasks.h:123
CompletionCriteria.h
mc_control::fsm::State
Definition: State.h:58
mc_control
Definition: CompletionCriteria.h:10
MetaTask.h
State.h
MC_CONTROL_FSM_STATE_DLLAPI
#define MC_CONTROL_FSM_STATE_DLLAPI
Definition: api.h:50
mc_control::fsm::MetaTasksState
Definition: MetaTasks.h:99
mc_control::CompletionCriteria
Definition: CompletionCriteria.h:53
mc_control::fsm::Controller
Definition: Controller.h:49