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

#include <ISSBallOnPlate.h>

Inheritance diagram for Rcs::ISSBallOnPlate:
Collaboration diagram for Rcs::ISSBallOnPlate:

Public Member Functions

 ISSBallOnPlate (RcsGraph *graph)
 
virtual ~ISSBallOnPlate ()
 
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

RcsBody * ball
 
RcsBody * plate
 
double plateWidth
 
double plateHeight
 

Additional Inherited Members

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

Detailed Description

Initial state setter for the ball-on-plate environment. The initial state consists of the x and y position of the ball relative to the plate center.

Definition at line 43 of file ISSBallOnPlate.h.

Constructor & Destructor Documentation

◆ ISSBallOnPlate()

Rcs::ISSBallOnPlate::ISSBallOnPlate ( RcsGraph *  graph)

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

Parameters
graphgraph to set the state on

Definition at line 42 of file ISSBallOnPlate.cpp.

◆ ~ISSBallOnPlate()

Rcs::ISSBallOnPlate::~ISSBallOnPlate ( )
virtual

Definition at line 69 of file ISSBallOnPlate.cpp.

Member Function Documentation

◆ applyInitialState()

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

Set initial state of the graph.

Implements Rcs::InitStateSetter.

Definition at line 99 of file ISSBallOnPlate.cpp.

◆ getDim()

unsigned int Rcs::ISSBallOnPlate::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 74 of file ISSBallOnPlate.cpp.

◆ getMinMax()

void Rcs::ISSBallOnPlate::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 79 of file ISSBallOnPlate.cpp.

◆ getNames()

std::vector< std::string > Rcs::ISSBallOnPlate::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 94 of file ISSBallOnPlate.cpp.

Member Data Documentation

◆ ball

RcsBody* Rcs::ISSBallOnPlate::ball
private

Definition at line 64 of file ISSBallOnPlate.h.

◆ plate

RcsBody* Rcs::ISSBallOnPlate::plate
private

Definition at line 65 of file ISSBallOnPlate.h.

◆ plateHeight

double Rcs::ISSBallOnPlate::plateHeight
private

Definition at line 67 of file ISSBallOnPlate.h.

◆ plateWidth

double Rcs::ISSBallOnPlate::plateWidth
private

Definition at line 66 of file ISSBallOnPlate.h.


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