Public Member Functions | |
JTask () | |
virtual jspace::Status | init (jspace::Model const &model) |
Abstract, implemented by subclasses in order to initialize the task. | |
virtual jspace::Status | update (jspace::Model const &model) |
Abstract, implemented by subclasses in order to compute the current task state, the command acceleration, and the Jacobian. | |
Public Attributes | |
double | kp_ |
double | kd_ |
jspace::Vector | goal_ |
Definition at line 53 of file tut02_jtask.cpp.
tut02::JTask::JTask | ( | ) | [inline] |
Definition at line 55 of file tut02_jtask.cpp.
virtual jspace::Status tut02::JTask::init | ( | jspace::Model const & | model | ) | [inline, virtual] |
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 57 of file tut02_jtask.cpp.
References jspace::Model::getNDOF(), jspace::Model::getState(), goal_, opspace::Task::jacobian_, kd_, and kp_.
virtual jspace::Status tut02::JTask::update | ( | jspace::Model const & | model | ) | [inline, virtual] |
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 94 of file tut02_jtask.cpp.
References opspace::Task::actual_, opspace::Task::command_, jspace::Model::getState(), goal_, kd_, and kp_.
double tut02::JTask::kp_ |
double tut02::JTask::kd_ |