#include <task_library.hpp>
Public Member Functions | |
CartPosTask (std::string const &name) | |
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 Status | check (std::string const *param, std::string const &value) const |
Default implementation always returns succes. | |
void | quickSetup (Vector const &kp, Vector const &kd, Vector const &maxvel, std::string const &name, Vector const &control_point) |
Protected Member Functions | |
taoDNode const * | updateActual (Model const &model) |
Protected Attributes | |
std::string | end_effector_name_ |
Vector | control_point_ |
taoDNode const * | end_effector_node_ |
Servos a control point, specified with respect to a given end_effector link, to the goal position.
Definition at line 178 of file task_library.hpp.
opspace::CartPosTask::CartPosTask | ( | std::string const & | name | ) | [explicit] |
Definition at line 403 of file task_library.cpp.
References control_point_, opspace::ParameterReflection::declareParameter(), end_effector_name_, and opspace::PARAMETER_FLAG_NOLOG.
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 415 of file task_library.cpp.
References opspace::Task::actual_, control_point_, end_effector_name_, end_effector_node_, opspace::PDTask::initPDTask(), and updateActual().
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 432 of file task_library.cpp.
References opspace::Task::actual_, opspace::Task::command_, jspace::Model::computeJacobian(), opspace::PDTask::computePDCommand(), end_effector_node_, jspace::Model::getState(), opspace::Task::jacobian_, and updateActual().
Status opspace::CartPosTask::check | ( | std::string const * | param, | |
std::string const & | value | |||
) | const [virtual] |
Default implementation always returns succes.
Reimplemented from opspace::ParameterReflection.
Definition at line 452 of file task_library.cpp.
References end_effector_name_, and end_effector_node_.
void opspace::CartPosTask::quickSetup | ( | Vector const & | kp, | |
Vector const & | kd, | |||
Vector const & | maxvel, | |||
std::string const & | name, | |||
Vector const & | control_point | |||
) | [inline] |
Definition at line 188 of file task_library.hpp.
References control_point_, end_effector_name_, and opspace::PDTask::quickSetup().
taoDNode const * opspace::CartPosTask::updateActual | ( | Model const & | model | ) | [protected] |
Definition at line 463 of file task_library.cpp.
References opspace::Task::actual_, jspace::Model::computeGlobalFrame(), control_point_, end_effector_name_, end_effector_node_, and jspace::Model::getNodeByName().
Referenced by init(), and update().
std::string opspace::CartPosTask::end_effector_name_ [protected] |
Definition at line 197 of file task_library.hpp.
Referenced by CartPosTask(), check(), init(), quickSetup(), and updateActual().
Vector opspace::CartPosTask::control_point_ [protected] |
Definition at line 198 of file task_library.hpp.
Referenced by CartPosTask(), init(), quickSetup(), and updateActual().
taoDNode const* opspace::CartPosTask::end_effector_node_ [mutable, protected] |
Definition at line 200 of file task_library.hpp.
Referenced by check(), init(), update(), and updateActual().