#include <task_library.hpp>


Public Member Functions | |
| DraftPIDTask (std::string const &name) | |
| virtual Status | check (double const *param, double value) const |
| Default implementation always returns succes. | |
| virtual Status | check (Vector const *param, Vector const &value) const |
| Verifies that kp, kd, and maxvel are non-negative. | |
| virtual Status | init (Model const &model) |
| Abstract, implemented by subclasses in order to initialize the task. | |
| virtual Status | update (Model const &model) |
| Abstract, implemented by subclasses in order to compute the current task state, the command acceleration, and the Jacobian. | |
| virtual void | dbg (std::ostream &os, std::string const &title, std::string const &prefix) const |
Protected Member Functions | |
| Status | initDraftPIDTask (Vector const &initpos) |
| Status | computeDraftPIDCommand (Vector const &curpos, Vector const &curvel, Vector &command) |
Protected Attributes | |
| double | dt_seconds_ |
| Vector | ki_ |
| Vector | errsum_ |
| Vector | limitpos_ |
| Vector | limitvel_ |
| Vector | triggerpos_ |
Definition at line 134 of file task_library.hpp.
| opspace::DraftPIDTask::DraftPIDTask | ( | std::string const & | name | ) | [explicit] |
Definition at line 207 of file task_library.cpp.
References opspace::ParameterReflection::declareParameter(), dt_seconds_, errsum_, ki_, limitpos_, limitvel_, opspace::PARAMETER_FLAG_NOLOG, and triggerpos_.

| Status opspace::DraftPIDTask::check | ( | double const * | param, | |
| double | value | |||
| ) | const [virtual] |
Default implementation always returns succes.
Reimplemented from opspace::ParameterReflection.
Definition at line 221 of file task_library.cpp.
References dt_seconds_.
| Status opspace::DraftPIDTask::check | ( | Vector const * | param, | |
| Vector const & | value | |||
| ) | const [virtual] |
Verifies that kp, kd, and maxvel are non-negative.
If initialized, also verifies the vector dimension for kp, kd, maxvel, goalpos, and goalvel.
Reimplemented from opspace::PDTask.
Definition at line 233 of file task_library.cpp.
References errsum_, opspace::PDTask::goalpos_, opspace::PDTask::initialized_, ki_, limitpos_, limitvel_, and triggerpos_.
Abstract, implemented by subclasses in order to initialize the task.
This is important for stateful tasks, for instance in order to initialize a trajectory-following behavior. The init() method also gets called when tasks are switched at runtime, so subclasses should NOT assume that init() only gets called once at startup.
Implements opspace::Task.
Definition at line 367 of file task_library.cpp.
References opspace::Task::actual_, jspace::Model::getNDOF(), jspace::Model::getState(), initDraftPIDTask(), and opspace::Task::jacobian_.

Abstract, implemented by subclasses in order to compute the current task state, the command acceleration, and the Jacobian.
Given the current joint-space model passed as argument to this method, subclasses have to set the actual_, command_, and jacobian_ fields. These will then get retrieved according to the task hierarchy and assembled into joint torque commands using dynamically consistent nullspace projection.
Implements opspace::Task.
Definition at line 376 of file task_library.cpp.
References opspace::Task::actual_, opspace::Task::command_, computeDraftPIDCommand(), and jspace::Model::getState().

| void opspace::DraftPIDTask::dbg | ( | std::ostream & | os, | |
| std::string const & | title, | |||
| std::string const & | prefix | |||
| ) | const [virtual] |
Reimplemented from opspace::Task.
Definition at line 386 of file task_library.cpp.
References opspace::PDTask::errpos_, errsum_, opspace::ParameterReflection::instance_name_, ki_, jspace::pretty_print(), and triggerpos_.

| Status opspace::DraftPIDTask::initDraftPIDTask | ( | Vector const & | initpos | ) | [protected] |
Definition at line 258 of file task_library.cpp.
References dt_seconds_, errsum_, opspace::PDTask::initPDTask(), ki_, limitpos_, limitvel_, and triggerpos_.
Referenced by init().

| Status opspace::DraftPIDTask::computeDraftPIDCommand | ( | Vector const & | curpos, | |
| Vector const & | curvel, | |||
| Vector & | command | |||
| ) | [protected] |
Definition at line 318 of file task_library.cpp.
References opspace::PDTask::computePDCommand(), dt_seconds_, opspace::PDTask::errpos_, errsum_, opspace::PDTask::errvel_, ki_, limitpos_, limitvel_, and triggerpos_.
Referenced by update().

double opspace::DraftPIDTask::dt_seconds_ [protected] |
Definition at line 157 of file task_library.hpp.
Referenced by check(), computeDraftPIDCommand(), DraftPIDTask(), and initDraftPIDTask().
Vector opspace::DraftPIDTask::ki_ [protected] |
Definition at line 158 of file task_library.hpp.
Referenced by check(), computeDraftPIDCommand(), dbg(), DraftPIDTask(), and initDraftPIDTask().
Vector opspace::DraftPIDTask::errsum_ [protected] |
Definition at line 159 of file task_library.hpp.
Referenced by check(), computeDraftPIDCommand(), dbg(), DraftPIDTask(), and initDraftPIDTask().
Vector opspace::DraftPIDTask::limitpos_ [protected] |
Definition at line 160 of file task_library.hpp.
Referenced by check(), computeDraftPIDCommand(), DraftPIDTask(), and initDraftPIDTask().
Vector opspace::DraftPIDTask::limitvel_ [protected] |
Definition at line 161 of file task_library.hpp.
Referenced by check(), computeDraftPIDCommand(), DraftPIDTask(), and initDraftPIDTask().
Vector opspace::DraftPIDTask::triggerpos_ [protected] |
Definition at line 162 of file task_library.hpp.
Referenced by check(), computeDraftPIDCommand(), dbg(), DraftPIDTask(), and initDraftPIDTask().
1.5.4