Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
transformations.hpp
Go to the documentation of this file.
1#pragma once
2#include <Eigen/Dense>
3namespace common_lib::maths {
10double normalize_angle(double angle);
11
17double get_wheel_velocity_from_rpm(const double rpm, const double wheel_diameter);
18
26Eigen::Matrix2d get_rotation_matrix(const double angle);
27
35Eigen::Vector2d cartesian_to_cylindrical(const Eigen::Vector2d& cartesian);
36
45Eigen::VectorXd global_to_local_coordinates(const Eigen::Vector3d& local_reference_frame,
46 const Eigen::VectorXd& global_points);
47
56Eigen::VectorXd local_to_global_coordinates(const Eigen::Vector3d& local_reference_frame,
57 const Eigen::VectorXd& local_points);
58} // namespace common_lib::maths
Eigen::Matrix2d get_rotation_matrix(const double angle)
Function to get the rotation matrix for a given angle.
double get_wheel_velocity_from_rpm(const double rpm, const double wheel_diameter)
Function to get the translational velocity of a wheel from rpm and wheel diameter.
Eigen::Vector2d cartesian_to_cylindrical(const Eigen::Vector2d &cartesian)
Function to convert cartesian coordinates to cylindrical coordinates.
Eigen::VectorXd global_to_local_coordinates(const Eigen::Vector3d &local_reference_frame, const Eigen::VectorXd &global_points)
Transform points from a global reference frame to a local reference frame.
double normalize_angle(double angle)
Function to keep angle in [-Pi, Pi[ radians.
Eigen::VectorXd local_to_global_coordinates(const Eigen::Vector3d &local_reference_frame, const Eigen::VectorXd &local_points)
Transform points from a local reference frame to a global reference frame.