AUV-Coop-Assembly
Master Thesis for Robotics Engineering. Cooperative peg-in-hole assembly with two underwater vehicles guided by vision
Public Member Functions | List of all members
Controller Class Reference

The Controller class is responsabile of 1) taking matrices and giving them to Tasks classes, so they can compute their activations, references, jacobians, etc matrices 2) After all tasks have setted matrices, it executes the icat algorithm and return the yDot to the caller. More...

#include <controller.h>

Public Member Functions

 Controller (std::string robotName)
 Controller::Controller constructor. More...
 
int updateMultipleTasksMatrices (std::vector< Task * > tasks, struct Infos *const robInfo)
 Controller::updateAllTaskMatrices This function calls all the updateMatrices of each task. More...
 
int updateSingleTaskMatrices (Task *task, struct Infos *const robInfo)
 Controller::updateSingleTaskMatrices This function calls the updateMatrices for a single task. More...
 
std::vector< double > execAlgorithm (std::vector< Task * > tasks)
 Controller::execAlgorithm this function calls the step of the algorithm modifying (in the for) each time the projection matrix Q and command vector yDot. The function call equalityIcat or inequalityIcat according to the type of task. More...
 
int resetAllAlgosFlag (std::vector< Task * > tasks)
 Controller::resetAllAlgosFlag Flag_W Mu_W Flag_G Mu_G must be resetted before each TPIK. More...
 
int resetAllUpdatedFlags (std::vector< Task * > tasks)
 Controller::resetAllUpdatedFlags to be called at the end of the control loop, so next loop all matrices are updated (because robot moved) More...
 

Detailed Description

The Controller class is responsabile of 1) taking matrices and giving them to Tasks classes, so they can compute their activations, references, jacobians, etc matrices 2) After all tasks have setted matrices, it executes the icat algorithm and return the yDot to the caller.

Definition at line 20 of file controller.h.

Constructor & Destructor Documentation

Controller::Controller ( std::string  robotName)

Controller::Controller constructor.

Parameters
nameof the robot (for printing things)

Definition at line 7 of file controller.cpp.

Member Function Documentation

std::vector< double > Controller::execAlgorithm ( std::vector< Task * >  tasks)

Controller::execAlgorithm this function calls the step of the algorithm modifying (in the for) each time the projection matrix Q and command vector yDot. The function call equalityIcat or inequalityIcat according to the type of task.

Returns
the yDot command to be send to the robot at each loop

Definition at line 101 of file controller.cpp.

int Controller::resetAllAlgosFlag ( std::vector< Task * >  tasks)

Controller::resetAllAlgosFlag Flag_W Mu_W Flag_G Mu_G must be resetted before each TPIK.

Returns

Definition at line 79 of file controller.cpp.

int Controller::resetAllUpdatedFlags ( std::vector< Task * >  tasks)

Controller::resetAllUpdatedFlags to be called at the end of the control loop, so next loop all matrices are updated (because robot moved)

Parameters
taskslist of task to reset
Returns
0 correct exec

Definition at line 63 of file controller.cpp.

int Controller::updateMultipleTasksMatrices ( std::vector< Task * >  tasks,
struct Infos *const  robInfo 
)

Controller::updateAllTaskMatrices This function calls all the updateMatrices of each task.

Parameters
tasksthe vector of tasks pointer
robInfothe struct where all infos needed by all the tasks are
Returns
0 to correct execution
Note
usage of overridden pure virtual method tasks[i]->updateMatrices()

Definition at line 20 of file controller.cpp.

int Controller::updateSingleTaskMatrices ( Task task,
struct Infos *const  robInfo 
)

Controller::updateSingleTaskMatrices This function calls the updateMatrices for a single task.

Parameters
*taskpointer to the task that must be updated
robInfothe struct where all infos needed by all the tasks are
Returns
0 to correct execution
Note
usage of overridden pure virtual method task->updateMatrices()

Definition at line 43 of file controller.cpp.


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