ocra-recipes
Doxygen documentation for the ocra-recipes repository
PointContactTaskBuilder.cpp
Go to the documentation of this file.
2 
3 using namespace ocra;
4 
6 : TaskBuilder(taskOptions, modelPtr)
7 {
8 }
9 
11 {
12 
13 }
14 
16 {
17  std::string featFrameName = this->options.taskName + ".SegmentFrame";
18  std::string featName = this->options.taskName + ".PositionFeature";
19  std::string segmentName = this->model->SegmentName(this->options.segment);
20 
21  ControlFrame::Ptr featFrame = std::make_shared<SegmentFrame>(featFrameName, *this->model, segmentName, this->options.offset);
22 
23  return std::make_shared<PointContactFeature>(featName, featFrame);
24 }
25 
27 {
28  Feature::Ptr emptyFeatureDesPtr;
29  return emptyFeatureDesPtr;
30 }
31 
33 {
34  this->task->setFrictionCoeff(this->options.mu);
35  this->task->setMargin(this->options.margin);
36  this->task->activateContactMode();
37 }
38 
40 {
41  this->task->setTaskType(Task::ACCELERATIONTASK);
42  this->task->setMetaTaskType(Task::POINT_CONTACT);
43 }
44 
46 {
47  this->task->activateAsConstraint();
48 }
PointContactTaskBuilder(const TaskBuilderOptions &taskOptions, Model::Ptr modelPtr)
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
virtual Feature::Ptr buildFeatureDesired()
Task::Ptr task
Definition: TaskBuilder.h:19
TaskBuilderOptions options
Definition: TaskBuilder.h:21
Model::Ptr model
Definition: TaskBuilder.h:20
Eigen::Displacementd offset