ocra-recipes
Doxygen documentation for the ocra-recipes repository
|
#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< TaskBuilderOptions > | parseTaskOptionsFromXml (const std::string &optionsXmlFilePath) |
Definition at line 42 of file TaskConstructionManager.h.
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.
|
virtual |
Definition at line 21 of file TaskConstructionManager.cpp.
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".
model | Pointer to ocra model. |
controller | Pointer to ocra controller. |
optionsVector | A 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.
options | Options for a single task. |
model | Robot's OCRA model. |
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).
optionsXmlFilePath | Full path to XML tasks description. |
Definition at line 63 of file TaskConstructionManager.cpp.