31 #ifndef _OBSERVATIONMODEL_H_ 32 #define _OBSERVATIONMODEL_H_ 34 #include "../util/BoxSpaceProvider.h" 36 #include <Rcs_MatNd.h> 37 #include <Rcs_graph.h> 66 void computeObservation(MatNd* observation,
const MatNd* currentAction,
double dt)
const;
86 virtual void computeObservation(
double* state,
double* velocity,
const MatNd* currentAction,
double dt)
const = 0;
96 virtual void getLimits(
double* minState,
double* maxState,
double* maxVelocity)
const;
103 virtual void reset();
124 virtual void getMinMax(
double* min,
double* max)
const final;
130 virtual unsigned int getDim()
const final;
136 virtual std::vector<std::string>
getNames()
const final;
144 template<
typename OM>
147 auto dc =
dynamic_cast<OM*
>(
this);
152 dc = nested->findModel<OM>();
166 operator bool()
const 180 template<
typename OM>
184 auto dc =
dynamic_cast<OM*
>(
this);
189 auto no = nested->findOffsets<OM>();
191 return {local.
pos + no.pos, local.
vel + no.vel};
194 local.
pos += nested->getStateDim();
195 local.
vel += nested->getVelocityDim();
204 virtual std::vector<ObservationModel*>
getNested()
const;
virtual ~ObservationModel()
virtual std::vector< std::string > getStateNames() const
virtual std::vector< ObservationModel * > getNested() const
virtual std::vector< std::string > getVelocityNames() const
virtual void getMinMax(double *min, double *max) const final
MatNd * computeObservation(const MatNd *currentAction, double dt) const
virtual unsigned int getVelocityDim() const
virtual unsigned int getStateDim() const =0
virtual void getLimits(double *minState, double *maxState, double *maxVelocity) const
virtual std::vector< std::string > getNames() const final
virtual unsigned int getDim() const final