Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
NoWSSBicycleModel Class Reference

#include <no_wss_bicycle_model.hpp>

Inheritance diagram for NoWSSBicycleModel:
Inheritance graph
Collaboration diagram for NoWSSBicycleModel:
Collaboration graph

Public Member Functions

 NoWSSBicycleModel (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 center of mass given the velocities of the wheels
 
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, the the orientation and the distance between the center of mass and the rear axis.
 
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 wheels given the velocities of the center of mass.
 
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 velocities.
 

Private Attributes

common_lib::car_parameters::CarParameters car_parameters_
 

Detailed Description

Definition at line 10 of file no_wss_bicycle_model.hpp.

Constructor & Destructor Documentation

◆ NoWSSBicycleModel()

NoWSSBicycleModel::NoWSSBicycleModel ( common_lib::car_parameters::CarParameters  car_parameters)
inline

Definition at line 14 of file no_wss_bicycle_model.hpp.

Member Function Documentation

◆ cg_velocity_to_wheels()

Eigen::VectorXd NoWSSBicycleModel::cg_velocity_to_wheels ( const Eigen::Vector3d &  cg_velocities)
overridevirtual

Assumes a bicycle model and a set of parameters about the vehicle to calculate the velocities of the wheels given the velocities of the center of mass.

Parameters
cg_velocitiesvector of velocities on the Center of Gravity {velocity_x, velocity_y, rotational_velocity} in m/s and rad/s respectively
Returns
Eigen::VectorXd rpms of the wheels, the steering angle, and motor rpms {fl_rpm, fr_rpm, steering_angle, motor_rpm}

Implements S2VModel.

◆ jacobian_cg_velocity_to_wheels()

Eigen::MatrixXd NoWSSBicycleModel::jacobian_cg_velocity_to_wheels ( const Eigen::Vector3d &  cg_velocities)
overridevirtual

Calculates the jacobian of the function cg_velocity_to_wheels with respect to the center of mass velocities.

Parameters
cg_velocitiesvector of velocities on the Center of Gravity {velocity_x, velocity_y, rotational_velocity} in m/s and rad/s respectively
Returns
Eigen::MatrixXd jacobian matrix of dimension 6x3

Implements S2VModel.

◆ rear_axis_position()

common_lib::structures::Position NoWSSBicycleModel::rear_axis_position ( const common_lib::structures::Position cg,
double  orientation,
double  dist_cg_2_rear_axis 
)
overridevirtual

Calculates the position of the rear axis given the position of the center of mass, the the orientation and the distance between the center of mass and the rear axis.

Parameters
cgposition of the center of mass in meters
orientationorientation of the vehicle relative to the world frame in radians
dist_cg_2_rear_axisdisntance between the center of mass and the rear axis in meters
Returns
common_lib::structures::Position

Implements S2VModel.

◆ wheels_velocities_to_cg()

std::pair< double, double > NoWSSBicycleModel::wheels_velocities_to_cg ( double  rl_rpm,
double  fl_rpm,
double  rr_rpm,
double  fr_rpm,
double  steering_angle 
)
overridevirtual

assumes a bicycle model and a set of parameters about the vehicle to calculate the velocities of the center of mass given the velocities of the wheels

Parameters
rl_rpmrear left wheel velocity in rpm
fl_rpmfront left wheel velocity in rpm
steering_anglesteering angle in radians
Returns
std::pair<double, double> translational and rotational velocities of the center of mass in m/s and rad/s respectively

Implements S2VModel.

Member Data Documentation

◆ car_parameters_

common_lib::car_parameters::CarParameters NoWSSBicycleModel::car_parameters_
private

Definition at line 11 of file no_wss_bicycle_model.hpp.


The documentation for this class was generated from the following file: