Bratmobile
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Controller Class Referenceabstract

Callback interface class for implementing custom strategies to switch between tasks to be executed. More...

#include <task_controller.h>

Inheritance diagram for Controller:
Inheritance graph
[legend]
Collaboration diagram for Controller:
Collaboration graph
[legend]

Public Member Functions

virtual void next_task (Task &currentTask, const Task &controlGoal, const TransitionSystem &g, std::vector< vertexDescriptor > &current_vertices, std::vector< vertexDescriptor > &plan)=0
 Virtual function used to choose the next task. More...
 
Disturbance get_disturbance ()
 Returns the disturbance being counteracted as in the cognitive map.
 
void set_disturbance (const Disturbance &d)
 
b2Transform disturbance_to_goal ()
 returns the distance between the disturbance_q and the goal this is used to maintain constant ratios during tracking More...
 

Static Public Member Functions

static int motor_step (Task::Action a, float distance=0.27)
 Assigns fixed duration (in amount of motor callbacks) More...
 

Protected Member Functions

vertexDescriptor get_current_vertex (const std::vector< vertexDescriptor > &cv)
 Get the current vertex. More...
 

Protected Attributes

Disturbance disturbance_q
 
b2Transform _D_to_goal =b2Transform_zero
 

Detailed Description

Callback interface class for implementing custom strategies to switch between tasks to be executed.

Member Function Documentation

◆ disturbance_to_goal()

b2Transform Controller::disturbance_to_goal ( )
inline

returns the distance between the disturbance_q and the goal this is used to maintain constant ratios during tracking

Returns
b2Transform

◆ get_current_vertex()

vertexDescriptor Controller::get_current_vertex ( const std::vector< vertexDescriptor > &  cv)
inlineprotected

Get the current vertex.

Parameters
cvvector of vertices making up the current task

◆ motor_step()

int Controller::motor_step ( Task::Action  a,
float  distance = 0.27 
)
static

Assigns fixed duration (in amount of motor callbacks)

Parameters
athe action of the task
distancethe distance travelled in a task, default is robot length
Returns
int

◆ next_task()

virtual void Controller::next_task ( Task currentTask,
const Task controlGoal,
const TransitionSystem &  g,
std::vector< vertexDescriptor > &  current_vertices,
std::vector< vertexDescriptor > &  plan 
)
pure virtual

Virtual function used to choose the next task.

Parameters
currentTaskthe current task
controlGoalthe overarching goal task
gthe cognitive map
current_verticesa container with the cognitive map vertices representing the current Task (more than one if Task has been split)
planthe plan

Implemented in Reactive_Controller, and Wise_Controller.


The documentation for this class was generated from the following files: