|
bitsim
Model, simulate, estimate and control robots in C++
|
Classes | |
| struct | Run |
| class | CartPoleDynamics |
| A cart on a straight track, pushed by a horizontal force F, with a pole hinged on it. More... | |
| struct | CartPoleParameters |
| The cart and the pole. The defaults are those of the classic cart-pole of Barto, Sutton and Anderson (1983), which Gymnasium's CartPole uses too. More... | |
Typedefs | |
| using | real_t |
| real_t | |
| using | RealColVec4d |
| 4D column vector | |
| using | uint_t |
| uint_t | |
| using | Matrix |
| The matrices of the linear models and the controllers. | |
| using | Vector |
| The vectors of the linear models and the controllers: states, inputs. | |
| using | CartPoleState |
| The state: the position of the cart [m], its velocity [m/s], the angle of the pole from upright [rad], positive when it leans towards +x, and its rate [rad/s]. | |
Functions | |
| Matrix | state_weights () |
| Matrix | input_weights () |
| CartPoleState | start () |
| template<typename Controller> | |
| Run | simulate (const std::string &name, Controller &&controller) |
| void | print (const Run &run) |
| cv::Mat | draw (const std::vector< Run > &runs, uint_t k, const CartPoleParameters &p) |
| void | record (const std::vector< Run > &runs, const std::string &directory) |
Variables | |
| const real_t | DT = 0.02 |
| const real_t | DURATION = 6.0 |
| const real_t | X0 = 1.5 |
| const real_t | THETA0 = 0.4 |
| const real_t | TRACK_BOUND = 2.3 |
| const uint_t | HORIZON = 40 |
| const real_t | PENALTY = 1000.0 |
| const real_t | RECORD_RATE = 25.0 |
The state: the position of the cart [m], its velocity [m/s], the angle of the pole from upright [rad], positive when it leans towards +x, and its rate [rad/s].
| using bitsim::control::Matrix |
The matrices of the linear models and the controllers.
| using bitsim::real_t |
| using bitsim::RealColVec4d |
4D column vector
| using bitsim::uint_t |
| using bitsim::control::Vector |
The vectors of the linear models and the controllers: states, inputs.
| cv::Mat cart_pole_lqr_mpc::draw | ( | const std::vector< Run > & | runs, |
| uint_t | k, | ||
| const CartPoleParameters & | p ) |
| Matrix cart_pole_lqr_mpc::input_weights | ( | ) |
| void cart_pole_lqr_mpc::print | ( | const Run & | run | ) |
| void cart_pole_lqr_mpc::record | ( | const std::vector< Run > & | runs, |
| const std::string & | directory ) |
| Run cart_pole_lqr_mpc::simulate | ( | const std::string & | name, |
| Controller && | controller ) |
| CartPoleState cart_pole_lqr_mpc::start | ( | ) |
| Matrix cart_pole_lqr_mpc::state_weights | ( | ) |
| const real_t cart_pole_lqr_mpc::DT = 0.02 |
| const real_t cart_pole_lqr_mpc::DURATION = 6.0 |
| const uint_t cart_pole_lqr_mpc::HORIZON = 40 |
| const real_t cart_pole_lqr_mpc::PENALTY = 1000.0 |
| const real_t cart_pole_lqr_mpc::RECORD_RATE = 25.0 |
| const real_t cart_pole_lqr_mpc::THETA0 = 0.4 |
| const real_t cart_pole_lqr_mpc::TRACK_BOUND = 2.3 |
| const real_t cart_pole_lqr_mpc::X0 = 1.5 |