Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
bicycle_model.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cmath>
4#include <iostream>
5#include <utility>
6
9
10class BicycleModel : public S2VModel {
12
13public:
28 std::pair<double, double> wheels_velocities_to_cg(double rl_rpm, [[maybe_unused]] double fl_rpm,
29 double rr_rpm, [[maybe_unused]] double fr_rpm,
30 double steering_angle) override;
31
42 double orientation,
43 double dist_cg_2_rear_axis) override;
53 Eigen::VectorXd cg_velocity_to_wheels(const Eigen::Vector3d& cg_velocities) override;
54
63 Eigen::MatrixXd jacobian_cg_velocity_to_wheels(const Eigen::Vector3d& cg_velocities) override;
64};
Simple bicycle model structure.
common_lib::car_parameters::CarParameters car_parameters_
BicycleModel(common_lib::car_parameters::CarParameters car_parameters)
std::pair< double, double > wheels_velocities_to_cg(double rl_rpm, double fl_rpm, double rr_rpm, double fr_rpm, double steering_angle) override
assumes a bicycle model and a set of parameters about the vehicle to calculate the velocities of the ...
Eigen::MatrixXd jacobian_cg_velocity_to_wheels(const Eigen::Vector3d &cg_velocities) override
Calculates the jacobian of the function cg_velocity_to_wheels with respect to the center of mass velo...
Eigen::VectorXd cg_velocity_to_wheels(const Eigen::Vector3d &cg_velocities) override
Assumes a bicycle model and a set of parameters about the vehicle to calculate the velocities of the ...
common_lib::structures::Position rear_axis_position(const common_lib::structures::Position &cg, double orientation, double dist_cg_2_rear_axis) override
Calculates the position of the rear axis given the position of the center of mass,...
Interface for models that convert data from sensor reference frame to vehicle reference frame and vic...
Definition s2v_model.hpp:12