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.
Dependencies: mbed
Odometry.h
00001 #ifndef ODOMETRY_H 00002 #define ODOMETRY_H 00003 00004 #include "mbed.h" 00005 #include "QEI.h" 00006 00007 class Odometry 00008 { 00009 public: 00010 Odometry(QEI *qei_left, QEI *qei_right, float radius_left, float radius_right, float v); 00011 00012 void setPos(float x, float y, float theta); 00013 void setX(float x); 00014 void setY(float Y); 00015 void setTheta(float theta); 00016 00017 float getX() {return x;} 00018 float getY() {return y;} 00019 float getTheta() {return theta;} 00020 00021 void reset(); 00022 00023 private: 00024 QEI* m_qei_left; 00025 int m_pulses_left; 00026 QEI* m_qei_right; 00027 int m_pulses_right; 00028 00029 float x, y, theta; 00030 00031 float m_radiusPerTick_left, m_radiusPerTick_right, m_v; 00032 00033 Ticker updater; 00034 00035 void update(); 00036 }; 00037 00038 #endif
Generated on Wed Jul 13 2022 09:34:30 by
1.7.2