#include <AMIKControllerActivation.h>
Public Member Functions | |
AMIKControllerActivation (RcsGraph *graph, TaskCombinationMethod tcm) | |
virtual | ~AMIKControllerActivation () |
void | addAlwaysActiveTask (Task *task) |
virtual unsigned int | getDim () const |
virtual void | getMinMax (double *min, double *max) const |
virtual std::vector< std::string > | getNames () const |
void | reset () |
virtual void | computeCommand (MatNd *q_des, MatNd *q_dot_des, MatNd *T_des, const MatNd *action, double dt) |
virtual void | getStableAction (MatNd *action) const |
MatNd * | getActivation () const |
MatNd * | getXdes () const |
void | setXdes (const MatNd *x_des) |
void | setXdesFromTaskSpec (std::vector< PropertySource *> &taskSpec) |
const char * | getTaskCombinationMethodName () const |
![]() | |
virtual ActionModel * | clone (RcsGraph *newGraph) const |
![]() | |
ActionModelIK (RcsGraph *graph) | |
ActionModelIK (RcsGraph *graph, std::vector< Task *> tasks) | |
virtual | ~ActionModelIK () |
const ControllerBase * | getController () const |
RcsGraph * | getDesiredGraph () const |
void | setDesiredGraph (RcsGraph *newGraph) |
void | setupCollisionModel (const RcsCollisionMdl *modelToCopy) |
void | computeIK (MatNd *q_des, MatNd *q_dot_des, MatNd *T_des, const MatNd *x_des, double dt) |
void | computeIKVel (MatNd *q_des, MatNd *q_dot_des, MatNd *T_des, const MatNd *x_dot_des, double dt) |
![]() | |
ActionModel (RcsGraph *graph) | |
virtual | ~ActionModel () |
ActionModel * | clone () const |
RcsGraph * | getGraph () |
void | setGraph (RcsGraph *newGraph) |
virtual ActionModel * | getWrappedActionModel () const |
const ActionModel * | unwrapAll () const |
ActionModel * | unwrapAll () |
template<typename AM > | |
const AM * | unwrap () const |
template<typename AM > | |
AM * | unwrap () |
![]() | |
BoxSpaceProvider () | |
virtual | ~BoxSpaceProvider () |
BoxSpaceProvider (const BoxSpaceProvider &)=delete | |
BoxSpaceProvider & | operator= (const BoxSpaceProvider &)=delete |
BoxSpaceProvider (BoxSpaceProvider &&)=delete | |
BoxSpaceProvider & | operator= (BoxSpaceProvider &&)=delete |
const BoxSpace * | getSpace () const |
Static Public Member Functions | |
static TaskCombinationMethod | checkTaskCombinationMethod (std::string tcmName) |
Protected Attributes | |
MatNd * | x_des |
unsigned int | dimAlwaysActiveTasks |
MatNd * | activation |
TaskCombinationMethod | taskCombinationMethod |
![]() | |
RcsGraph * | desiredGraph |
RcsCollisionMdl * | collisionMdl |
MatNd * | dx_des |
MatNd * | dH |
MatNd * | dq_ref |
![]() | |
RcsGraph * | graph |
Additional Inherited Members | |
![]() | |
void | addTask (Task *task) |
void | addFixedTask (Task *task, MatNd *value) |
unsigned int | getNumActiveTasks () const |
void | ikFromDX (MatNd *q_des, MatNd *q_dot_des, double dt) const |
Action model controlling the activations of multiple tasks. Each task is defined by a Rcs IK controller task. For every task, there is one activation variable as part of the action space. The activation is a value between 0 and 1, where 0 means to ignore the task completely. The activation values do not need to sum to 1.
Definition at line 46 of file AMIKControllerActivation.h.
|
explicit |
Constructor
[in] | tcm | Mode that determines how the different tasks a.k.a. movement primitives are combined |
Definition at line 71 of file AMIKControllerActivation.cpp.
|
virtual |
Definition at line 79 of file AMIKControllerActivation.cpp.
void Rcs::AMIKControllerActivation::addAlwaysActiveTask | ( | Task * | task | ) |
Add Rcs controller tasks that are always active. Do this after adding the regular tasks.
Definition at line 85 of file AMIKControllerActivation.cpp.
|
static |
Definition at line 217 of file AMIKControllerActivation.cpp.
|
virtual |
Compute the joint commands from a specified action and the current state.
[out] | q_des | desired joint positions |
[out] | q_dot_des | desired joint velocities |
[out] | T_des | desired joint torques |
[in] | action | input action values |
dt | difference in time since the last call. |
Reimplemented from Rcs::AMIKGeneric.
Definition at line 121 of file AMIKControllerActivation.cpp.
MatNd * Rcs::AMIKControllerActivation::getActivation | ( | ) | const |
Definition at line 259 of file AMIKControllerActivation.cpp.
|
virtual |
Get the number of tasks multiplied by their individual dimension, owned by the action model, except the always active tasks.
Reimplemented from Rcs::AMIKGeneric.
Definition at line 91 of file AMIKControllerActivation.cpp.
|
virtual |
Provides minimum and maximum values for the space.
The passed arrays will be large enough to hold getDim() values.
[out] | min | minimum value storage |
[out] | max | maximum value storage |
Reimplemented from Rcs::AMIKGeneric.
Definition at line 96 of file AMIKControllerActivation.cpp.
|
virtual |
Provides names for each entry of the space.
These are intended for use in python, i.e., for pandas dataframe column names.
Reimplemented from Rcs::AMIKGeneric.
Definition at line 105 of file AMIKControllerActivation.cpp.
|
virtual |
Obtain action values which would keep the system in the current state. For action variables which are velocities or accelerations, this should be 0. For action variables which are positions, this should be the current position.
[out] | action | matrix to write the values into |
Reimplemented from Rcs::AMIKGeneric.
Definition at line 211 of file AMIKControllerActivation.cpp.
const char * Rcs::AMIKControllerActivation::getTaskCombinationMethodName | ( | ) | const |
Definition at line 240 of file AMIKControllerActivation.cpp.
MatNd * Rcs::AMIKControllerActivation::getXdes | ( | ) | const |
Definition at line 264 of file AMIKControllerActivation.cpp.
|
virtual |
Called at the start of a rollout to reset any state modified by computeCommand(). This allows to reuse the ActionModel for a new simulation rollout. The graph state will already be reset, so it can be used safely. It will be called before the first rollout too, so it can also be used to setup internals that depend on operations in subclass constructors.
Reimplemented from Rcs::ActionModelIK.
Definition at line 114 of file AMIKControllerActivation.cpp.
void Rcs::AMIKControllerActivation::setXdes | ( | const MatNd * | x_des | ) |
Definition at line 269 of file AMIKControllerActivation.cpp.
void Rcs::AMIKControllerActivation::setXdesFromTaskSpec | ( | std::vector< PropertySource *> & | taskSpec | ) |
Definition at line 276 of file AMIKControllerActivation.cpp.
|
protected |
The activation resulting from the action and the task combination method (used for logging)
Definition at line 93 of file AMIKControllerActivation.h.
|
protected |
Store the cumulative number of task dimensions which are always active.
Definition at line 91 of file AMIKControllerActivation.h.
|
protected |
Way to combine the tasks' contribution.
Definition at line 95 of file AMIKControllerActivation.h.
|
protected |
The goal in task space.
Definition at line 89 of file AMIKControllerActivation.h.