ocra-recipes
Doxygen documentation for the ocra-recipes repository
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ocra::TaskBuilder Class Referenceabstract

#include <TaskBuilder.h>

Inheritance diagram for ocra::TaskBuilder:
[legend]
Collaboration diagram for ocra::TaskBuilder:
[legend]

Public Member Functions

 TaskBuilder (const TaskBuilderOptions &taskOptions, Model::Ptr modelPtr)
 
virtual ~TaskBuilder ()
 
void buildTask ()
 
Task::Ptr getTask ()
 
void setTaskParameters ()
 

Protected Member Functions

virtual void setTaskType ()=0
 
virtual void setTaskState ()=0
 
virtual Feature::Ptr buildFeature ()=0
 
virtual Feature::Ptr buildFeatureDesired ()=0
 
virtual void setTaskAsObjectiveOrConstraint ()
 

Protected Attributes

Task::Ptr task
 
Model::Ptr model
 
TaskBuilderOptions options
 

Detailed Description

Definition at line 15 of file TaskBuilder.h.

Constructor & Destructor Documentation

TaskBuilder::TaskBuilder ( const TaskBuilderOptions taskOptions,
Model::Ptr  modelPtr 
)

Definition at line 6 of file TaskBuilder.cpp.

TaskBuilder::~TaskBuilder ( )
virtual

Definition at line 13 of file TaskBuilder.cpp.

Member Function Documentation

virtual Feature::Ptr ocra::TaskBuilder::buildFeature ( )
protectedpure virtual
virtual Feature::Ptr ocra::TaskBuilder::buildFeatureDesired ( )
protectedpure virtual
void TaskBuilder::buildTask ( )

Defines a feature and a desired feature of type ocra::Feature and consequently instantiates the corresponding task. The way a feature is built depends on the implementation (e.g. FullPostureTaskBuilder::buildFeature) written for each task-specific TaskBuilder.

Definition at line 18 of file TaskBuilder.cpp.

Task::Ptr TaskBuilder::getTask ( )

Returns a pointer to the task associated to the TaskBuilder.

Returns
Pointer to the task contained in the TaskBuilder object.

Definition at line 34 of file TaskBuilder.cpp.

void TaskBuilder::setTaskAsObjectiveOrConstraint ( )
protectedvirtual

This function is overloaded for cases where the task should be treated as a constraint and not as an objective. If not overloaded the base class implementation will be called and set the task to an objective.

Reimplemented in ocra::PointContactTaskBuilder.

Definition at line 52 of file TaskBuilder.cpp.

void TaskBuilder::setTaskParameters ( )

First sets a specific task as objective or constraint, its task level, weight, stiffness, damping and the task state (which is specific to the type of task. This information comes naturally from the task builder options passed during the construction of a TaskBuilder.

Definition at line 39 of file TaskBuilder.cpp.

virtual void ocra::TaskBuilder::setTaskState ( )
protectedpure virtual
virtual void ocra::TaskBuilder::setTaskType ( )
protectedpure virtual

Member Data Documentation

Model::Ptr ocra::TaskBuilder::model
protected

Definition at line 20 of file TaskBuilder.h.

TaskBuilderOptions ocra::TaskBuilder::options
protected

Definition at line 21 of file TaskBuilder.h.

Task::Ptr ocra::TaskBuilder::task
protected

Definition at line 19 of file TaskBuilder.h.


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