1 #ifndef TASK_CONTROLLER_H
2 #define TASK_CONTROLLER_H
5 #include "graphTools.h"
14 b2Transform _D_to_goal=b2Transform_zero;
39 virtual void next_task(
Task & currentTask,
const Task & controlGoal,
const TransitionSystem & g, std::vector <vertexDescriptor> & current_vertices, std::vector <vertexDescriptor> & plan)=0;
82 void next_task(
Task & currentTask,
const Task & controlGoal,
const TransitionSystem & g, std::vector <vertexDescriptor> & current_vertices, std::vector<vertexDescriptor> & plan);
91 int to_task_end(
const TransitionSystem& g, std::vector<vertexDescriptor>& plan);
106 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);
119 void 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
virtual void next_task(Task ¤tTask, const Task &controlGoal, const TransitionSystem &g, std::vector< vertexDescriptor > ¤t_vertices, std::vector< vertexDescriptor > &plan)=0
Virtual function used to choose the next task.
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:67
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:53
Chooses the next task reactively (Braitenberg controller)
Definition: task_controller.h:114
void next_task(Task ¤tTask, 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:80
Chooses tasks based on a plan.
Definition: task_controller.h:77
void next_task(Task ¤tTask, 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:17
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:41
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:32
Definition: disturbance.h:112