ForwardKinematics.h
Go to the documentation of this file.
1 
7 #ifndef FORWARDKINEMATICS_H_
8 #define FORWARDKINEMATICS_H_
9 
10 #include <utility>
11 #include <vector>
12 #include <eigen3/Eigen/LU>
13 #include <eigen3/Eigen/Dense>
14 #include <cmath>
15 
29 {
30 public:
44  ForwardKinematics(double k, std::vector<double> initialPose = std::vector<double>(3, 0));
49  const double getRadius() const;
54  double flattenZeros(double value);
60  double degToRad(double angle);
66  double radToDeg(double angle);
72  std::pair<double, double> calcICC(double alpha);
78  double calcRadius(std::pair<double, double> ICC);
85  double calcTheta(double distance, double radius);
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);
110  double PI;
112 private:
113  double k;
114  double radius;
115  Eigen::Matrix4d initT;
116  std::vector<Eigen::Matrix4d> T;
117  Eigen::Matrix4d prevT;
118  std::vector<double> currentPosition;
122  void init();
123 };
124 
125 #endif /* FORWARDKINEMATICS_H_ */
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 ...
Eigen::Matrix4d initT
Eigen::Matrix4d prevT
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.


pses_simulation
Author(s): Sebastian Ehmes
autogenerated on Wed Dec 13 2017 19:37:54