bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bicycle_vehicle_model_dynamics.h
Go to the documentation of this file.
1#ifndef BITSIM_DYNAMICS_BICYCLE_VEHICLE_MODEL_DYNAMICS_H
2#define BITSIM_DYNAMICS_BICYCLE_VEHICLE_MODEL_DYNAMICS_H
3
8
9#include <any>
10#include <map>
11#include <string>
12
13namespace bitsim
14{
15namespace dynamics
16{
17
31
43 : public MotionModelDynamicsBase<SysState<3>, DynamicsMatrixDescriptor,
44 std::map<std::string, std::any>>
45{
46
47 public:
49 std::map<std::string, std::any>>;
50
56
61 SysState<3> &init_state);
62
71 void integrate(const input_type &input);
72
78 state_type &evaluate(const input_type &input);
79
84 void initialize_matrices(const input_type &input);
85
90 void update_matrices(const input_type &input);
91
96 void load_from_json(const std::string &filename){};
97
98 private:
103};
104
105} // namespace dynamics
106} // namespace bitsim
107
108#endif // BITSIM_DYNAMICS_BICYCLE_VEHICLE_MODEL_DYNAMICS_H
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
base_type::input_type input_type
Definition bicycle_vehicle_model_dynamics.h:52
typename matrix_descriptor_type::vector_type vector_type
Definition bicycle_vehicle_model_dynamics.h:55
MotionModelDynamicsBase< SysState< 3 >, DynamicsMatrixDescriptor, std::map< std::string, std::any > > base_type
Definition bicycle_vehicle_model_dynamics.h:48
void initialize_matrices(const input_type &input)
initialize_matrices. Initialize the matrix description of the dynamics
Definition bicycle_vehicle_model_dynamics.cpp:54
base_type::state_type state_type
Definition bicycle_vehicle_model_dynamics.h:51
void integrate(const input_type &input)
Move the state by one step of config.dt with the inputs "v", the speed [m/s], "delta",...
Definition bicycle_vehicle_model_dynamics.cpp:18
base_type::matrix_descriptor_type matrix_descriptor_type
Definition bicycle_vehicle_model_dynamics.h:53
state_type & evaluate(const input_type &input)
evaluate
Definition bicycle_vehicle_model_dynamics.cpp:48
void update_matrices(const input_type &input)
update_matrices. Update the matrix description of the dynamics
Definition bicycle_vehicle_model_dynamics.cpp:61
BicycleVehicleModelDynamics(const BicycleVehicleModelDynamicsConfig config, SysState< 3 > &init_state)
Constructor.
Definition bicycle_vehicle_model_dynamics.cpp:12
typename matrix_descriptor_type::matrix_type matrix_type
Definition bicycle_vehicle_model_dynamics.h:54
void load_from_json(const std::string &filename)
load_from_json Load the description of the chassis from the given json file
Definition bicycle_vehicle_model_dynamics.h:96
The DynamicsMatrixDescriptor class. Helper class to model the matrix representon of dynamical systems...
Definition dynamics_matrix_descriptor.h:19
DynVec< real_t > vector_type
Definition dynamics_matrix_descriptor.h:23
DynMat< real_t > matrix_type
Definition dynamics_matrix_descriptor.h:22
SysState utility class describing the state of a system.
Definition system_state.h:25
Models of how things move: wheeled robots, a bicycle, a quadrotor and a fixed wing aircraft,...
Definition bicycle_vehicle_model_dynamics.cpp:10
Definition dc_motor_backend_base.h:9
double real_t
real_t
Definition bitsim_types.h:20
Definition bicycle_vehicle_model_dynamics.h:19
real_t dt
The time step to use in secs.
Definition bicycle_vehicle_model_dynamics.h:23
real_t L
The distance between the front and real wheels in m.
Definition bicycle_vehicle_model_dynamics.h:29