1 #ifndef TASK_CONTROLLER_H
2 #define TASK_CONTROLLER_H
5 #include "graphTools.h"
14 b2Transform _D_to_goal=b2Transform_zero;
26 Task stopTask(
const Task& controlGoal);
42 virtual Task next_task(
Task currentTask,
const Task & controlGoal,
const TransitionSystem & g, std::vector <vertexDescriptor> & current_vertices, std::vector <vertexDescriptor> & plan)=0;
85 Task next_task(
Task currentTask,
const Task & controlGoal,
const TransitionSystem & g, std::vector <vertexDescriptor> & current_vertices, std::vector<vertexDescriptor> & plan);
94 int to_task_end(
const TransitionSystem& g, std::vector<vertexDescriptor>& plan);
109 Task task_to_execute(
const std::vector<vertexDescriptor>&p,
const TransitionSystem& g,
int end_it,
const Task & controlGoal,
Task & currentTask,
const std::vector<vertexDescriptor> & current_vertices);
122 virtual Task next_task(
Task currentTask,
const Task & controlGoal,
const TransitionSystem & g, std::vector <vertexDescriptor> & current_vertices, std::vector<vertexDescriptor> & plan);
128 Task next_task(
Task currentTask,
const Task & controlGoal,
const TransitionSystem & g, std::vector <vertexDescriptor> & current_vertices, std::vector<vertexDescriptor> & plan);
Callback interface class for implementing custom strategies to switch between tasks to be executed.
Definition: task_controller.h:11
vertexDescriptor get_current_vertex(const std::vector< vertexDescriptor > &cv)
Get the current vertex.
Definition: task_controller.h:20
b2Transform disturbance_to_goal()
returns the distance between the disturbance_q and the goal this is used to maintain constant ratios ...
Definition: task_controller.h:70
virtual Task next_task(Task currentTask, const Task &controlGoal, const TransitionSystem &g, std::vector< vertexDescriptor > ¤t_vertices, std::vector< vertexDescriptor > &plan)=0
Virtual function used to choose the next task.
static int motor_step(Task::Action a, float distance=0.27)
Assigns fixed duration (in amount of motor callbacks)
Definition: task_controller.cpp:3
Disturbance get_disturbance()
Returns the disturbance being counteracted as in the cognitive map.
Definition: task_controller.h:56
Definition: task_controller.h:127
Chooses the next task reactively (Braitenberg controller)
Definition: task_controller.h:117
virtual Task next_task(Task currentTask, const Task &controlGoal, const TransitionSystem &g, std::vector< vertexDescriptor > ¤t_vertices, std::vector< vertexDescriptor > &plan)
Virtual function used to choose the next task.
Definition: task_controller.cpp:99
A closed hybrid control loop. It has an initial disturbance representing the continuous state and a d...
Definition: task.h:45
Chooses tasks based on a plan.
Definition: task_controller.h:80
Task next_task(Task currentTask, const Task &controlGoal, const TransitionSystem &g, std::vector< vertexDescriptor > ¤t_vertices, std::vector< vertexDescriptor > &plan)
Virtual function used to choose the next task.
Definition: task_controller.cpp:26
Task task_to_execute(const std::vector< vertexDescriptor > &p, const TransitionSystem &g, int end_it, const Task &controlGoal, Task ¤tTask, const std::vector< vertexDescriptor > ¤t_vertices)
Creates a new task by interpreting the states in a plan. Tasks split in several states are treated li...
Definition: task_controller.cpp:47
int to_task_end(const TransitionSystem &g, std::vector< vertexDescriptor > &plan)
returns last vertex of the task starting at plan[0]
Definition: task_controller.cpp:38
Definition: disturbance.h:114
The motor instructions generated by the control strategy used in this tasks.
Definition: task.h:63