|
| | BicycleVehicleModelDynamics (const BicycleVehicleModelDynamicsConfig config, SysState< 3 > &init_state) |
| | Constructor.
|
| void | integrate (const input_type &input) |
| | Move the state by one step of config.dt with the inputs "v", the speed [m/s], "delta", the steering angle of the front wheel [rad], and "errors", the errors added to both, an std::array<real_t, 2>: x += v cos(theta) dt, y += v sin(theta) dt, theta += v tan(delta) dt / L. If matrix updates are allowed, F and L are first set to the Jacobians of the step with respect to the state and to the errors.
|
| state_type & | evaluate (const input_type &input) |
| | evaluate
|
| void | initialize_matrices (const input_type &input) |
| | initialize_matrices. Initialize the matrix description of the dynamics
|
| void | update_matrices (const input_type &input) |
| | update_matrices. Update the matrix description of the dynamics
|
| void | load_from_json (const std::string &filename) |
| | load_from_json Load the description of the chassis from the given json file
|
| virtual | ~MotionModelDynamicsBase ()=default |
| | Destructor.
|
| const state_type & | get_state () const |
| | Read access to the state.
|
| state_type & | get_state () |
| | Read/write access to the state.
|
| std::vector< std::string_view > | get_state_variables_names () const |
| | get_state_variables_names. Returns the name of the variables in the state
|
| matrix_type & | get_matrix (const std::string &name) |
| const matrix_type & | get_matrix (const std::string &name) const |
| void | set_matrix (const std::string &name, const matrix_type &mat) |
| vector_type & | get_vector (const std::string &name) |
| const vector_type & | get_vector (const std::string &name) const |
| void | set_vector (const std::string &name, const vector_type &vec) |
| void | set_matrix_update_flag (bool f) |
| | set the matrix update flag
|
| bool | allows_matrix_updates () const |
| | Set the flag for updating or not the matrices describing the model.
|
| bool | has_matrix (const std::string &name) const |
| | Returns true if the matrix with the given name already exists.
|
| real_t | get_state_property (const std::string &name) const |
| | Returns the state property with the given name.
|
| void | set_state_property (const std::string &name, real_t value) |
| | Set the name-th value of the state.
|
| void | set_state_name_value (uint_t i, const std::string &name, real_t val) |
| | Set the state names.
|
| void | set_state_name_value (uint_t i, const std::pair< std::string, real_t > &val) |
| | Set the state names.
|
| void | set_time_step (real_t dt) |
| | Set the time step.
|
| real_t | get_time_step () const |
| | get_time_step Returns the sampling time the dynamics model is using
|
| real_t | get_tolerance () const |
| | get_tolerance Returns the general tolerance used in the calculations
|
| void | set_tolerance (real_t tol) |
| | set_tolerance Set the general tolerance used in the calculations. Default is KernelConsts::tolerance()
|
The BicycleVehicleModelDynamics class. Implements the bicycle vehicle model dynamics. The implementation of the dynamics is taken from the paper: Deep Reinforcement Learning for Mobile Robot Path Planning by Hao Liu, Yi Shen, Shuangjiang Yu, Zijun Gao, Tong Wu The state of the model is described by the tuple (X, Y, Phi) where (X,Y) denotes the 2D position of the vehicle in the world coordinates and phi denotes the heading of the vehicle.
| void bitsim::dynamics::BicycleVehicleModelDynamics::integrate |
( |
const input_type & | input | ) |
|
Move the state by one step of config.dt with the inputs "v", the speed [m/s], "delta", the steering angle of the front wheel [rad], and "errors", the errors added to both, an std::array<real_t, 2>: x += v cos(theta) dt, y += v sin(theta) dt, theta += v tan(delta) dt / L. If matrix updates are allowed, F and L are first set to the Jacobians of the step with respect to the state and to the errors.