#include <task_library.hpp>
Public Member Functions | |
JointLimitTask (std::string const &name) | |
virtual | ~JointLimitTask () |
virtual Status | check (Vector const *param, Vector const &value) const |
Default implementation always returns succes. | |
virtual Status | check (double const *param, double const &value) const |
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 | |
void | updateState (Model const &model) |
Protected Attributes | |
Vector | upper_stop_deg_ |
Vector | upper_trigger_deg_ |
Vector | lower_stop_deg_ |
Vector | lower_trigger_deg_ |
double | dt_seconds_ |
Vector | maxvel_ |
Vector | maxacc_ |
Vector | kp_ |
Vector | kd_ |
Vector | upper_stop_ |
Vector | upper_trigger_ |
Vector | lower_stop_ |
Vector | lower_trigger_ |
std::vector< TypeIOTGCursor * > | cursor_ |
Vector | goal_ |
Definition at line 377 of file task_library.hpp.
opspace::JointLimitTask::JointLimitTask | ( | std::string const & | name | ) | [explicit] |
Definition at line 857 of file task_library.cpp.
References opspace::ParameterReflection::declareParameter(), dt_seconds_, kd_, kp_, lower_stop_deg_, lower_trigger_deg_, maxacc_, maxvel_, opspace::PARAMETER_FLAG_NOLOG, upper_stop_deg_, and upper_trigger_deg_.
opspace::JointLimitTask::~JointLimitTask | ( | ) | [virtual] |
Status opspace::JointLimitTask::check | ( | Vector const * | param, | |
Vector const & | value | |||
) | const [virtual] |
Default implementation always returns succes.
Reimplemented from opspace::ParameterReflection.
Definition at line 883 of file task_library.cpp.
Status opspace::JointLimitTask::check | ( | double const * | param, | |
double const & | value | |||
) | const [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 914 of file task_library.cpp.
References cursor_, dt_seconds_, jspace::Model::getNDOF(), goal_, opspace::Task::jacobian_, kd_, kp_, lower_stop_, lower_stop_deg_, lower_trigger_, lower_trigger_deg_, maxacc_, maxvel_, ndof, updateState(), upper_stop_, upper_stop_deg_, upper_trigger_, and upper_trigger_deg_.
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 963 of file task_library.cpp.
References opspace::Task::actual_, opspace::Task::command_, cursor_, dt_seconds_, jspace::Model::getState(), goal_, opspace::Task::jacobian_, kd_, kp_, maxacc_, maxvel_, and updateState().
void opspace::JointLimitTask::dbg | ( | std::ostream & | os, | |
std::string const & | title, | |||
std::string const & | prefix | |||
) | const [virtual] |
Reimplemented from opspace::Task.
Definition at line 1052 of file task_library.cpp.
References opspace::Task::actual_, cursor_, goal_, opspace::ParameterReflection::instance_name_, opspace::Task::jacobian_, and jspace::pretty_print().
void opspace::JointLimitTask::updateState | ( | Model const & | model | ) | [protected] |
Definition at line 998 of file task_library.cpp.
References opspace::Task::actual_, cursor_, dt_seconds_, jspace::Model::getNDOF(), jspace::Model::getState(), goal_, opspace::Task::jacobian_, lower_stop_, lower_trigger_, ndof, upper_stop_, and upper_trigger_.
Referenced by init(), and update().
Vector opspace::JointLimitTask::upper_stop_deg_ [protected] |
Vector opspace::JointLimitTask::upper_trigger_deg_ [protected] |
Vector opspace::JointLimitTask::lower_stop_deg_ [protected] |
Vector opspace::JointLimitTask::lower_trigger_deg_ [protected] |
double opspace::JointLimitTask::dt_seconds_ [protected] |
Definition at line 399 of file task_library.hpp.
Referenced by check(), init(), JointLimitTask(), update(), and updateState().
Vector opspace::JointLimitTask::maxvel_ [protected] |
Definition at line 400 of file task_library.hpp.
Referenced by check(), init(), JointLimitTask(), and update().
Vector opspace::JointLimitTask::maxacc_ [protected] |
Definition at line 401 of file task_library.hpp.
Referenced by check(), init(), JointLimitTask(), and update().
Vector opspace::JointLimitTask::kp_ [protected] |
Definition at line 402 of file task_library.hpp.
Referenced by check(), init(), JointLimitTask(), and update().
Vector opspace::JointLimitTask::kd_ [protected] |
Definition at line 403 of file task_library.hpp.
Referenced by check(), init(), JointLimitTask(), and update().
Vector opspace::JointLimitTask::upper_stop_ [protected] |
Vector opspace::JointLimitTask::upper_trigger_ [protected] |
Vector opspace::JointLimitTask::lower_stop_ [protected] |
Vector opspace::JointLimitTask::lower_trigger_ [protected] |
std::vector<TypeIOTGCursor *> opspace::JointLimitTask::cursor_ [protected] |
Definition at line 411 of file task_library.hpp.
Referenced by check(), dbg(), init(), update(), updateState(), and ~JointLimitTask().
Vector opspace::JointLimitTask::goal_ [protected] |
Definition at line 412 of file task_library.hpp.
Referenced by dbg(), init(), update(), and updateState().