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

#include <ISSMiniGolf.h>

Inheritance diagram for Rcs::ISSMiniGolf:
Collaboration diagram for Rcs::ISSMiniGolf:

Public Member Functions

 ISSMiniGolf (RcsGraph *graph, bool fixedInitState)
 
virtual ~ISSMiniGolf ()
 
unsigned int getDim () const override
 
void getMinMax (double *min, double *max) const override
 
virtual std::vector< std::string > getNames () const
 
void applyInitialState (const MatNd *initialState) override
 
- Public Member Functions inherited from Rcs::InitStateSetter
 InitStateSetter (RcsGraph *graph)
 
virtual ~InitStateSetter ()
 
- 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

bool fixedInitState
 
RcsBody * ball
 

Additional Inherited Members

- Protected Attributes inherited from Rcs::InitStateSetter
RcsGraph * graph
 

Detailed Description

Initial state setter for the mini golf task. The initial state consists of the the x and y position of the ball.

Definition at line 43 of file ISSMiniGolf.h.

Constructor & Destructor Documentation

◆ ISSMiniGolf()

Rcs::ISSMiniGolf::ISSMiniGolf ( RcsGraph *  graph,
bool  fixedInitState 
)

Constructor. The passed graph must contain the ball body.

Parameters
graphgraph to set the state on

Definition at line 39 of file ISSMiniGolf.cpp.

◆ ~ISSMiniGolf()

Rcs::ISSMiniGolf::~ISSMiniGolf ( )
virtual

Definition at line 46 of file ISSMiniGolf.cpp.

Member Function Documentation

◆ applyInitialState()

void Rcs::ISSMiniGolf::applyInitialState ( const MatNd *  initialState)
overridevirtual

Set initial state of the graph.

Implements Rcs::InitStateSetter.

Definition at line 87 of file ISSMiniGolf.cpp.

◆ getDim()

unsigned int Rcs::ISSMiniGolf::getDim ( ) const
overridevirtual

Provides the number of elements in the space. Since the BoxSpace object will be cached, this must not change.

Returns
number of elements for the space.

Implements Rcs::BoxSpaceProvider.

Definition at line 51 of file ISSMiniGolf.cpp.

◆ getMinMax()

void Rcs::ISSMiniGolf::getMinMax ( double *  min,
double *  max 
) const
overridevirtual

Provides the minimum and maximum state values. The default implementation uses -inf and inf.

Reimplemented from Rcs::InitStateSetter.

Definition at line 56 of file ISSMiniGolf.cpp.

◆ getNames()

std::vector< std::string > Rcs::ISSMiniGolf::getNames ( ) const
virtual

Provides names for each entry of the space.

These are intended for use in python, i.e., for pandas dataframe column names.

Returns
a vector of name strings. Must be of length getDim() or empty.

Reimplemented from Rcs::BoxSpaceProvider.

Definition at line 82 of file ISSMiniGolf.cpp.

Member Data Documentation

◆ ball

RcsBody* Rcs::ISSMiniGolf::ball
private

Definition at line 65 of file ISSMiniGolf.h.

◆ fixedInitState

bool Rcs::ISSMiniGolf::fixedInitState
private

Definition at line 64 of file ISSMiniGolf.h.


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