mlpack
|
Implementation of the state of Double Pole Cart. More...
#include <double_pole_cart.hpp>
Public Member Functions | |
State () | |
Construct a state instance. | |
State (const arma::colvec &data) | |
Construct a state instance from given data. More... | |
arma::colvec | Data () const |
Get the internal representation of the state. | |
arma::colvec & | Data () |
Modify the internal representation of the state. | |
double | Position () const |
Get the position of the cart. | |
double & | Position () |
Modify the position of the cart. | |
double | Velocity () const |
Get the velocity of the cart. | |
double & | Velocity () |
Modify the velocity of the cart. | |
double | Angle (const size_t i) const |
Get the angle of the $i^{th}$ pole. | |
double & | Angle (const size_t i) |
Modify the angle of the $i^{th}$ pole. | |
double | AngularVelocity (const size_t i) const |
Get the angular velocity of the $i^{th}$ pole. | |
double & | AngularVelocity (const size_t i) |
Modify the angular velocity of the $i^{th}$ pole. | |
const arma::colvec & | Encode () const |
Encode the state to a vector.. | |
Static Public Attributes | |
static constexpr size_t | dimension = 6 |
Dimension of the encoded state. | |
Implementation of the state of Double Pole Cart.
The state is expressed as a vector (position, velocity, angle, angular velocity, angle, angular velocity)
|
inline |
Construct a state instance from given data.
data | Data for the position, velocity, angle and angular velocity. |