Takeuchi Issei / Mbed 2 deprecated 4Omunisleeve3

Dependencies:   mbed Eigen

Revision:
0:ee7e9405e1c7
--- /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