Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: shared/Odometry3/Odometry3.h
- Revision:
- 0:ee7e9405e1c7
diff -r 000000000000 -r ee7e9405e1c7 shared/Odometry3/Odometry3.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/shared/Odometry3/Odometry3.h Wed Apr 14 07:26:19 2021 +0000
@@ -0,0 +1,40 @@
+#ifndef ODOMETRY3_H_
+#define ODOMETRY3_H_
+
+#include <shared/OdometryUnit/OdometryUnit.h>
+#include <Dense.h>
+#include <shared/EigenCalculation/EigenCalculation.h>
+
+class Odometry3
+{
+public:
+ static const int NUM = 3;
+ Odometry3(OdometryUnit *wheel[NUM]);
+ virtual ~Odometry3(){};
+
+ Eigen::Vector3d read_position();
+
+ void write_position(const Eigen::Vector3d& set_position);
+ void reset_position();
+
+ Eigen::Vector3d get_velocity();
+
+ void set_coefficient_matrix();
+
+ enum VectorElements{
+ X,
+ Y,
+ Yaw
+ };
+
+private:
+ Eigen::Vector3d _read_velocity();
+ void _set_coefficient_matrix();
+
+ OdometryUnit *_wheel[NUM];
+ Eigen::Matrix3d _coefficient_matrix;
+ Eigen::Vector3d _position;
+ Eigen::Vector3d _velocity;
+};
+
+#endif