RcsPySim
A robot control and simulation library
Rcs::OMBallPos Class Reference

#include <OMBallPos.h>

Inheritance diagram for Rcs::OMBallPos:
Collaboration diagram for Rcs::OMBallPos:

Public Member Functions

 OMBallPos (RcsGraph *graph)
 
virtual ~OMBallPos ()
 
virtual void computeObservation (double *state, double *velocity, const MatNd *currentAction, double dt) const
 
virtual void reset ()
 
- Public Member Functions inherited from Rcs::OMBodyStateLinear
 OMBodyStateLinear (RcsGraph *graph, const char *effectorName, const char *refBodyName=NULL, const char *refFrameName=NULL)
 
- Public Member Functions inherited from Rcs::OMTask
 OMTask (Task *task)
 
virtual ~OMTask ()
 
 OMTask (const OMTask &)=delete
 
OMTaskoperator= (const OMTask &)=delete
 
 OMTask (OMTask &&)=delete
 
OMTaskoperator= (OMTask &&)=delete
 
virtual unsigned int getStateDim () const
 
virtual void getLimits (double *minState, double *maxState, double *maxVelocity) const
 
virtual std::vector< std::string > getStateNames () const
 
OMTasksetMinState (double minState)
 
OMTasksetMinState (std::vector< double > minState)
 
OMTasksetMaxState (double maxState)
 
OMTasksetMaxState (std::vector< double > maxState)
 
OMTasksetMaxVelocity (double maxVelocity)
 
OMTasksetMaxVelocity (std::vector< double > maxVelocity)
 
Task * getTask () const
 
- Public Member Functions inherited from Rcs::ObservationModel
virtual ~ObservationModel ()
 
MatNd * computeObservation (const MatNd *currentAction, double dt) const
 
void computeObservation (MatNd *observation, const MatNd *currentAction, double dt) const
 
virtual unsigned int getVelocityDim () 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
 
- Public Member Functions inherited from Rcs::BoxSpaceProvider
 BoxSpaceProvider ()
 
virtual ~BoxSpaceProvider ()
 
 BoxSpaceProvider (const BoxSpaceProvider &)=delete
 
BoxSpaceProvideroperator= (const BoxSpaceProvider &)=delete
 
 BoxSpaceProvider (BoxSpaceProvider &&)=delete
 
BoxSpaceProvideroperator= (BoxSpaceProvider &&)=delete
 
const BoxSpacegetSpace () const
 

Private Attributes

double ballRadius
 

Additional Inherited Members

- Protected Member Functions inherited from Rcs::OMTask
void initTaskBodyNames (const char *effectorName, const char *refBodyName, const char *refFrameName)
 

Detailed Description

Observes the ball position relative to the plate.

This is a special case that removes the ball's radius from it's z position, making the observation invariant of a (changing) ball radius.

Definition at line 45 of file OMBallPos.h.

Constructor & Destructor Documentation

◆ OMBallPos()

Rcs::OMBallPos::OMBallPos ( RcsGraph *  graph)

Constructor.

The passed graph must contain two bodies named "Ball" and "Plate".

Parameters
graphgraph to observe.

Definition at line 39 of file OMBallPos.cpp.

◆ ~OMBallPos()

Rcs::OMBallPos::~OMBallPos ( )
virtual

Definition at line 66 of file OMBallPos.cpp.

Member Function Documentation

◆ computeObservation()

void Rcs::OMBallPos::computeObservation ( double *  state,
double *  velocity,
const MatNd *  currentAction,
double  dt 
) const
virtual

Implement to fill the observation vector with the observed values.

Parameters
[out]statestate observation vector to fill, has getStateDim() elements.
[out]velocityvelocity observation vector to fill, has getVelocityDim() elements.
[in]currentActionaction in current step. May be NULL if not available.
[in]dttime step since the last observation has been taken

Reimplemented from Rcs::OMTask.

Definition at line 71 of file OMBallPos.cpp.

◆ reset()

void Rcs::OMBallPos::reset ( )
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 78 of file OMBallPos.cpp.

Member Data Documentation

◆ ballRadius

double Rcs::OMBallPos::ballRadius
private

Definition at line 65 of file OMBallPos.h.


The documentation for this class was generated from the following files: