7 #ifndef FORWARDKINEMATICS_H_ 8 #define FORWARDKINEMATICS_H_ 12 #include <eigen3/Eigen/LU> 13 #include <eigen3/Eigen/Dense> 44 ForwardKinematics(
double k, std::vector<double> initialPose = std::vector<double>(3, 0));
72 std::pair<double, double>
calcICC(
double alpha);
78 double calcRadius(std::pair<double, double> ICC);
92 Eigen::Matrix4d*
calcRot(
double theta,
double alpha);
101 Eigen::Matrix4d*
calcTrans(
double radius,
double distance,
double alpha,
102 std::pair<double, double> ICC);
109 std::vector<double>&
getUpdate(
double alpha,
double distance);
116 std::vector<Eigen::Matrix4d>
T;
Eigen::Matrix4d * calcRot(double theta, double alpha)
Calculate the current rotation matrix.
Eigen::Matrix4d * calcTrans(double radius, double distance, double alpha, std::pair< double, double > ICC)
Calculate the current translation matrix.
double flattenZeros(double value)
Rounds values close to zero to exactly zero.
ForwardKinematics()
ForwardKinematics default constructor.
double radToDeg(double angle)
Conversion from radiants to degrees.
double calcTheta(double distance, double radius)
Calculate the current orientation of the robot with respect to the coordinate system of the previous ...
std::pair< double, double > calcICC(double alpha)
Calculates the current instantaneous center of curvature given a steering angle.
std::vector< double > & getUpdate(double alpha, double distance)
Get the current position and orientation.
std::vector< Eigen::Matrix4d > T
double calcRadius(std::pair< double, double > ICC)
Calculate the radius of the current robot tracjectory around the instantaneous center of curvature (I...
void init()
Initialize simulation.
const double getRadius() const
Get the radius of the current robot tracjectory around the instantaneous center of curvature (ICC)...
The ForwardKinematics class simulates kinematic behavoir of a car like mobile platform given its curr...
std::vector< double > currentPosition
double degToRad(double angle)
Conversion from degrees to radiants.