ocra-recipes
Doxygen documentation for the ocra-recipes repository
Public Member Functions | List of all members
ocra::TaskConstructionManager Class Reference

#include <TaskConstructionManager.h>

Public Member Functions

 TaskConstructionManager ()
 
 TaskConstructionManager (Model::Ptr model, Controller::Ptr controller, std::vector< TaskBuilderOptions > optionsVector)
 
 TaskConstructionManager (Model::Ptr model, Controller::Ptr controller, const std::string &optionsXmlFilePath)
 
virtual ~TaskConstructionManager ()
 
void addTasksToController (Model::Ptr model, Controller::Ptr controller, std::vector< TaskBuilderOptions > optionsVector)
 
TaskBuilder::Ptr getBuilder (TaskBuilderOptions options, Model::Ptr model)
 
std::vector< TaskBuilderOptionsparseTaskOptionsFromXml (const std::string &optionsXmlFilePath)
 

Detailed Description

Definition at line 42 of file TaskConstructionManager.h.

Constructor & Destructor Documentation

TaskConstructionManager::TaskConstructionManager ( )

Definition at line 6 of file TaskConstructionManager.cpp.

TaskConstructionManager::TaskConstructionManager ( Model::Ptr  model,
Controller::Ptr  controller,
std::vector< TaskBuilderOptions optionsVector 
)

Definition at line 11 of file TaskConstructionManager.cpp.

TaskConstructionManager::TaskConstructionManager ( Model::Ptr  model,
Controller::Ptr  controller,
const std::string &  optionsXmlFilePath 
)

Definition at line 16 of file TaskConstructionManager.cpp.

TaskConstructionManager::~TaskConstructionManager ( )
virtual

Definition at line 21 of file TaskConstructionManager.cpp.

Member Function Documentation

void TaskConstructionManager::addTasksToController ( Model::Ptr  model,
Controller::Ptr  controller,
std::vector< TaskBuilderOptions optionsVector 
)

This method is called during the instantiation of an object of type TaskConstructionManager when the corresponding parameters are passed to the constructor. For every task specified through XML it creates a corresponding TaskBuilder object, builds the task, then tells the Controller to add this task to its stack of tasks and finally specifies whether the task is an objective or a constraint, what its level, weight, stiffness and damping. We call this, setting the "task parameters".

Parameters
modelPointer to ocra model.
controllerPointer to ocra controller.
optionsVectorA vector of N TaskBuilderOptions elements, where N is the number of tasks described in the taskSet XML file.

Definition at line 26 of file TaskConstructionManager.cpp.

TaskBuilder::Ptr TaskConstructionManager::getBuilder ( TaskBuilderOptions  options,
Model::Ptr  model 
)

First calls correctArticularVariables on the parsed options of a single task. Depending on the type of this task it will then return a pointer to a task-stype-pecific TaskBuilder class. Examples of these specific classes are: CartesianTaskBuilder, PoseTaskBuilder, OrientationTaskBuilder, ComTaskBuilder, FullPostureTaskBuilder, PartialPostureTaskBuilder and PointContactTaskBuilder.

Parameters
optionsOptions for a single task.
modelRobot's OCRA model.
Returns
Pointer to the task-type-specific TaskBuilder.

Definition at line 38 of file TaskConstructionManager.cpp.

std::vector< TaskBuilderOptions > TaskConstructionManager::parseTaskOptionsFromXml ( const std::string &  optionsXmlFilePath)

Given an XML description of control tasks it first checks the XML existance and then parses each task description through TaskConstructionManager::parseTaskOptionsFromXml(TiXmlDocument* newTasksFile).

Parameters
optionsXmlFilePathFull path to XML tasks description.
Returns
A vector of elements of type TaskBuilderOptions.
See also
TaskConstructionManager::parseTaskOptionsFromXml(TiXmlDocument* newTasksFile)

Definition at line 63 of file TaskConstructionManager.cpp.


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