#include <OMTaskSpaceDiscrepancy.h>
Public Member Functions | |
OMTaskSpaceDiscrepancy (const char *bodyName, const RcsGraph *controllerGraph, const RcsGraph *configGraph, double maxDiscrepancy=1.) | |
virtual | ~OMTaskSpaceDiscrepancy () |
virtual unsigned int | getStateDim () const |
unsigned int | getVelocityDim () const override |
void | getLimits (double *minState, double *maxState, double *maxVelocity) const override |
virtual void | computeObservation (double *state, double *velocity, const MatNd *currentAction, double dt) const |
void | reset () override |
virtual std::vector< std::string > | getStateNames () const |
![]() | |
virtual | ~ObservationModel () |
MatNd * | computeObservation (const MatNd *currentAction, double dt) const |
void | computeObservation (MatNd *observation, const MatNd *currentAction, double dt) const |
virtual std::vector< std::string > | getVelocityNames () const |
virtual void | getMinMax (double *min, double *max) const final |
virtual unsigned int | getDim () const final |
virtual std::vector< std::string > | getNames () const final |
template<typename OM > | |
OM * | findModel () |
template<typename OM > | |
Offsets | findOffsets () |
virtual std::vector< ObservationModel * > | getNested () const |
![]() | |
BoxSpaceProvider () | |
virtual | ~BoxSpaceProvider () |
BoxSpaceProvider (const BoxSpaceProvider &)=delete | |
BoxSpaceProvider & | operator= (const BoxSpaceProvider &)=delete |
BoxSpaceProvider (BoxSpaceProvider &&)=delete | |
BoxSpaceProvider & | operator= (BoxSpaceProvider &&)=delete |
const BoxSpace * | getSpace () const |
Private Attributes | |
RcsBody * | bodyController |
RcsBody * | bodyConfig |
double | maxDiscrepancy |
ObservationModel computing the discrepancy between a body's position in the desired graph (owned by the controller) and the current graph (owned by the config) in task space.
Definition at line 46 of file OMTaskSpaceDiscrepancy.h.
|
explicit |
Create from action model. NOTE: assumes that the task activation action model wraps a IK-based action model.
Definition at line 42 of file OMTaskSpaceDiscrepancy.cpp.
|
virtual |
Definition at line 55 of file OMTaskSpaceDiscrepancy.cpp.
|
virtual |
Implement to fill the observation vector with the observed values.
[out] | state | state observation vector to fill, has getStateDim() elements. |
[out] | velocity | velocity observation vector to fill, has getVelocityDim() elements. |
[in] | currentAction | action in current step. May be NULL if not available. |
[in] | dt | time step since the last observation has been taken |
Implements Rcs::ObservationModel.
Definition at line 78 of file OMTaskSpaceDiscrepancy.cpp.
|
overridevirtual |
Provides the minimum and maximum observable values. Since the velocity is symmetric, only the maximum needs to be provided. The default implementation uses -inf and inf.
[out] | minState | minimum state vector to fill, has getStateDim() elements. |
[out] | maxState | maximum state vector to fill, has getStateDim() elements. |
[out] | maxVelocity | maximum velocity vector to fill, has getVelocityDim() elements. |
Reimplemented from Rcs::ObservationModel.
Definition at line 70 of file OMTaskSpaceDiscrepancy.cpp.
|
virtual |
The number of state variables.
Implements Rcs::ObservationModel.
Definition at line 60 of file OMTaskSpaceDiscrepancy.cpp.
|
virtual |
Provides names for each state entry.
Reimplemented from Rcs::ObservationModel.
Definition at line 99 of file OMTaskSpaceDiscrepancy.cpp.
|
overridevirtual |
The number of velocity variables. The default implementation assumes that for each state there is a velocity.
Reimplemented from Rcs::ObservationModel.
Definition at line 65 of file OMTaskSpaceDiscrepancy.cpp.
|
overridevirtual |
Reset any internal state. This is called to begin a new episode. It should also reset values depending on modifiable physics parameters. This is an optional operation, so the default implementation does nothing.
Reimplemented from Rcs::ObservationModel.
Definition at line 93 of file OMTaskSpaceDiscrepancy.cpp.
|
private |
Definition at line 79 of file OMTaskSpaceDiscrepancy.h.
|
private |
Definition at line 78 of file OMTaskSpaceDiscrepancy.h.
|
private |
Definition at line 82 of file OMTaskSpaceDiscrepancy.h.