Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
s2v_model.hpp
Go to the documentation of this file.
1#pragma once
2#include <Eigen/Dense>
3#include <utility>
4
12class S2VModel {
13public:
26 virtual std::pair<double, double> wheels_velocities_to_cg(double rl_rpm,
27 [[maybe_unused]] double fl_rpm,
28 double rr_rpm,
29 [[maybe_unused]] double fr_rpm,
30 double steering_angle) = 0;
31
42 const common_lib::structures::Position& cg, double orientation,
43 double dist_cg_2_rear_axis) = 0;
44
54 virtual Eigen::VectorXd cg_velocity_to_wheels(const Eigen::Vector3d& cg_velocities) = 0;
55
68 virtual Eigen::MatrixXd jacobian_cg_velocity_to_wheels(const Eigen::Vector3d& cg_velocities) = 0;
69};
Interface for models that convert data from sensor reference frame to vehicle reference frame and vic...
Definition s2v_model.hpp:12
virtual std::pair< double, double > wheels_velocities_to_cg(double rl_rpm, double fl_rpm, double rr_rpm, double fr_rpm, double steering_angle)=0
Calculates the translational and rotational velocities of the vehicle from wheel rotations and steeri...
virtual Eigen::VectorXd cg_velocity_to_wheels(const Eigen::Vector3d &cg_velocities)=0
Estimate wheel and motor velocities, as well as steering angle from the velocities of the center of g...
virtual Eigen::MatrixXd jacobian_cg_velocity_to_wheels(const Eigen::Vector3d &cg_velocities)=0
jacobian of the function cg_velocity_to_wheels with respect to the velocities of the center of gravit...
virtual common_lib::structures::Position rear_axis_position(const common_lib::structures::Position &cg, double orientation, double dist_cg_2_rear_axis)=0
Calculate rear axis coordinates.