tut04::JTask Class Reference

Inheritance diagram for tut04::JTask:

Inheritance graph
[legend]
Collaboration diagram for tut04::JTask:

Collaboration graph
[legend]

List of all members.

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

bool initialized_
bool inertia_compensation_
bool coriolis_compensation_
double kp_
double kd_
jspace::Vector goalpos_
jspace::Vector goalvel_


Detailed Description

Definition at line 48 of file tut04_inertia_coriolis.cpp.


Constructor & Destructor Documentation

tut04::JTask::JTask (  )  [inline]

Definition at line 50 of file tut04_inertia_coriolis.cpp.


Member Function Documentation

virtual jspace::Status tut04::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 58 of file tut04_inertia_coriolis.cpp.

References jspace::Model::getNDOF(), jspace::Model::getState(), goalpos_, goalvel_, initialized_, opspace::Task::jacobian_, kd_, and kp_.

Referenced by update().

Here is the call graph for this function:

virtual jspace::Status tut04::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.

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

Implements opspace::Task.

Definition at line 88 of file tut04_inertia_coriolis.cpp.

References opspace::Task::actual_, opspace::Task::command_, coriolis_compensation_, jspace::Model::getCoriolisCentrifugal(), jspace::Model::getGravity(), jspace::Model::getMassInertia(), jspace::Model::getState(), goalpos_, goalvel_, inertia_compensation_, init(), initialized_, kd_, and kp_.

Here is the call graph for this function:


Member Data Documentation

bool tut04::JTask::initialized_

Definition at line 142 of file tut04_inertia_coriolis.cpp.

Referenced by init(), and update().

bool tut04::JTask::inertia_compensation_

Definition at line 143 of file tut04_inertia_coriolis.cpp.

Referenced by update().

bool tut04::JTask::coriolis_compensation_

Definition at line 144 of file tut04_inertia_coriolis.cpp.

Referenced by update().

double tut04::JTask::kp_

Definition at line 145 of file tut04_inertia_coriolis.cpp.

Referenced by init(), and update().

double tut04::JTask::kd_

Definition at line 145 of file tut04_inertia_coriolis.cpp.

Referenced by init(), and update().

jspace::Vector tut04::JTask::goalpos_

Definition at line 146 of file tut04_inertia_coriolis.cpp.

Referenced by init(), and update().

jspace::Vector tut04::JTask::goalvel_

Definition at line 146 of file tut04_inertia_coriolis.cpp.

Referenced by init(), and update().


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