#include <OMCombined.h>
Public Member Functions | |
virtual | ~OMCombined () |
void | addPart (ObservationModel *part) |
virtual unsigned int | getStateDim () const |
virtual unsigned int | getVelocityDim () const |
virtual void | computeObservation (double *state, double *velocity, const MatNd *currentAction, double dt) const |
virtual void | getLimits (double *minState, double *maxState, double *maxVelocity) const |
virtual void | reset () |
virtual std::vector< std::string > | getStateNames () const |
virtual std::vector< std::string > | getVelocityNames () const |
virtual std::vector< ObservationModel * > | getNested () const |
![]() | |
virtual | ~ObservationModel () |
MatNd * | computeObservation (const MatNd *currentAction, double dt) const |
void | computeObservation (MatNd *observation, const MatNd *currentAction, double dt) 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 () |
![]() | |
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 | |
std::vector< ObservationModel * > | parts |
Combines multiple ObservationModels into one by concatenating their observation vectors.
Definition at line 44 of file OMCombined.h.
|
virtual |
Definition at line 36 of file OMCombined.cpp.
void Rcs::OMCombined::addPart | ( | ObservationModel * | part | ) |
Add an ObservationModel as part of this combined model.
This must be done right after construction, before reset() is called for the first time.
OMCombined will assume ownership of the passed object.
[in] | part | part model to add |
Definition at line 43 of file OMCombined.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 68 of file OMCombined.cpp.
|
virtual |
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 78 of file OMCombined.cpp.
|
virtual |
List directly nested observation models. The default implementation returns an empty list, since there are no nested models.
Reimplemented from Rcs::ObservationModel.
Definition at line 127 of file OMCombined.cpp.
|
virtual |
The number of state variables.
Implements Rcs::ObservationModel.
Definition at line 48 of file OMCombined.cpp.
|
virtual |
Provides names for each state entry.
Reimplemented from Rcs::ObservationModel.
Definition at line 91 of file OMCombined.cpp.
|
virtual |
The number of velocity variables. The default implementation assumes that for each state there is a velocity.
Reimplemented from Rcs::ObservationModel.
Definition at line 58 of file OMCombined.cpp.
|
virtual |
Provides names for each velocity entry. The default implementation derives the names from getStateNames(), appending a 'd' to each name.
Reimplemented from Rcs::ObservationModel.
Definition at line 105 of file OMCombined.cpp.
|
virtual |
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 119 of file OMCombined.cpp.
|
private |
Definition at line 77 of file OMCombined.h.