Bratmobile
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Configurator Class Referenceabstract
Inheritance diagram for Configurator:
Inheritance graph
[legend]
Collaboration diagram for Configurator:
Collaboration graph
[legend]

Public Member Functions

 Configurator (Task _task)
 
void init (Task _task=Task())
 Initialises configurator. More...
 
bool Spawner ()
 Calls functions to explore the state space and extract a plan. More...
 
int getIteration ()
 
void addIteration (int i=1)
 
void dummy_vertex (vertexDescriptor src)
 
simResult simulate (Task, b2World &)
 
void estimate_current_vertex ()
 
void printPlan (std::vector< vertexDescriptor > *p=NULL)
 
std::pair< edgeDescriptor, bool > addVertex (const vertexDescriptor &src, vertexDescriptor &v1, Edge edge=Edge(), bool topDown=0)
 Add state to the cognitive map and set next state Task direction and options. More...
 
virtual void explore_plan (b2World &)=0
 Explores and plan.
 
void start ()
 
void stop ()
 
void registerInterface (LIDAR_In *, Motor_Out *)
 
void change_task ()
 changes tasks to execute on
 
void update_graph (TransitionSystem &g, const b2Transform &_deltaPose)
 
float approximate_angle (const float &, const Direction &, const simResult::resultType &)
 
void adjust_goal_expectation ()
 
void register_controller (Controller *controller)
 
Controllerget_controller ()
 
void register_tracker (Tracker *_tracker)
 
Trackerget_tracker () const
 
Motor_Outget_motor_interface ()
 
LIDAR_Inget_lidar_interface ()
 
void register_planner (Planner *_p)
 
void setSimulationStep (float f)
 
void register_logger (Logger *l)
 

Static Public Member Functions

static void run (Configurator *)
 Spawns tasks, creates plans, tracks task and controls real-world task switching option to run in thread. Thread can be used if planning time might exceed 200ms (LIDAR sampling rate) but doesn't have to be.
 
static void MulT (const b2Transform &B, Task &task)
 Matrix multiply by transpose.
 
static void Mul (const b2Transform &B, Task &task)
 Matrix multiplication.
 

Protected Attributes

int iteration =0
 
Task currentTask
 
Controllertask_controller =NULL
 
Trackertracker =NULL
 
LIDAR_Inci =NULL
 
Motor_Outcontrol =NULL
 
Plannerplanner =NULL
 
Loggerlogger =NULL
 
bool running =0
 
std::thread * LIDAR_thread =NULL
 
float simulationStep =2*std::max(ROBOT_HALFLENGTH, ROBOT_HALFWIDTH)
 
std::chrono::high_resolution_clock::time_point previousTimeScan
 
GoalChangergoal_changer =NULL
 
std::vector< vertexDescriptor > m_plan
 
std::vector< vertexDescriptor > current_vertices
 
int bodies =0
 
Task controlGoal
 
CoordinateContainer data2fp
 
TransitionSystem transitionSystem =TransitionSystem(1)
 
WorldBuilder worldBuilder
 
vertexDescriptor currentVertex =MOVING_VERTEX
 
edgeDescriptor movingEdge =edgeDescriptor()
 
edgeDescriptor currentEdge =edgeDescriptor()
 

Member Function Documentation

◆ addVertex()

std::pair< edgeDescriptor, bool > Configurator::addVertex ( const vertexDescriptor &  src,
vertexDescriptor &  v1,
Edge  edge = Edge(),
bool  topDown = 0 
)

Add state to the cognitive map and set next state Task direction and options.

Parameters
srcsource state
v1new state
edgeconnecting edge between src->v1
topDownflag determining whether state v1 has been simulated already or not

◆ estimate_current_vertex()

void Configurator::estimate_current_vertex ( )
Parameters
gthe cognitive map
tthe task which is currently being executed on the robot

◆ init()

void Configurator::init ( Task  _task = Task())

Initialises configurator.

Parameters
_taskthe new overarching goal

◆ Spawner()

bool Configurator::Spawner ( )

Calls functions to explore the state space and extract a plan.

Returns
true
false

◆ update_graph()

void Configurator::update_graph ( TransitionSystem &  g,
const b2Transform &  _deltaPose 
)
Parameters
gthe cognitive map
_deltaPosethe transform to apply

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