opspace::SelectedJointPostureTask Class Reference

A test task which drives a subset of DOF to zero using non-saturated PD control. More...

#include <task_library.hpp>

Inheritance diagram for opspace::SelectedJointPostureTask:

Inheritance graph
[legend]
Collaboration diagram for opspace::SelectedJointPostureTask:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SelectedJointPostureTask (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 (double const *param, double value) const
 Default implementation always returns succes.
virtual Status check (Vector const *param, Vector const &value) const
 Default implementation always returns succes.

Protected Attributes

Vector selection_
double kp_
double kd_
bool initialized_
std::vector< size_t > active_joints_


Detailed Description

A test task which drives a subset of DOF to zero using non-saturated PD control.

Parameters:

Definition at line 234 of file task_library.hpp.


Constructor & Destructor Documentation

opspace::SelectedJointPostureTask::SelectedJointPostureTask ( std::string const &  name  )  [explicit]

Definition at line 508 of file task_library.cpp.

References opspace::ParameterReflection::declareParameter(), kd_, kp_, opspace::PARAMETER_FLAG_NOLOG, and selection_.

Here is the call graph for this function:


Member Function Documentation

Status opspace::SelectedJointPostureTask::init ( Model const &  model  )  [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 521 of file task_library.cpp.

References active_joints_, opspace::Task::actual_, opspace::Task::command_, jspace::Model::getNDOF(), jspace::Model::getState(), initialized_, opspace::Task::jacobian_, ndof, and selection_.

Here is the call graph for this function:

Status opspace::SelectedJointPostureTask::update ( Model const &  model  )  [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.

Note:
Make sure your subclass sets the actual_, command_, and jacobian_ fields in the implementation of this method.

Implements opspace::Task.

Definition at line 551 of file task_library.cpp.

References active_joints_, opspace::Task::actual_, opspace::Task::command_, jspace::Status::errstr, jspace::Model::getState(), initialized_, kd_, kp_, and jspace::Status::ok.

Here is the call graph for this function:

Status opspace::SelectedJointPostureTask::check ( double const *  param,
double  value 
) const [virtual]

Default implementation always returns succes.

Reimplemented from opspace::ParameterReflection.

Definition at line 570 of file task_library.cpp.

References jspace::Status::errstr, kd_, kp_, and jspace::Status::ok.

Status opspace::SelectedJointPostureTask::check ( Vector const *  param,
Vector const &  value 
) const [virtual]

Default implementation always returns succes.

Reimplemented from opspace::ParameterReflection.

Definition at line 582 of file task_library.cpp.

References jspace::Status::errstr, jspace::Status::ok, and selection_.


Member Data Documentation

Vector opspace::SelectedJointPostureTask::selection_ [protected]

Definition at line 246 of file task_library.hpp.

Referenced by check(), init(), and SelectedJointPostureTask().

double opspace::SelectedJointPostureTask::kp_ [protected]

Definition at line 247 of file task_library.hpp.

Referenced by check(), SelectedJointPostureTask(), and update().

double opspace::SelectedJointPostureTask::kd_ [protected]

Definition at line 248 of file task_library.hpp.

Referenced by check(), SelectedJointPostureTask(), and update().

bool opspace::SelectedJointPostureTask::initialized_ [protected]

Definition at line 249 of file task_library.hpp.

Referenced by init(), and update().

std::vector<size_t> opspace::SelectedJointPostureTask::active_joints_ [protected]

Definition at line 250 of file task_library.hpp.

Referenced by init(), and update().


The documentation for this class was generated from the following files:
Generated on Fri Aug 26 01:35:15 2011 for Stanford Whole-Body Control Framework by  doxygen 1.5.4