omni wheel library
Dependents: quadOmni_yanagi NHK2017_octopus hayatoShooter
オムニ用のライブラリです。
Diff: omni.h
- Revision:
- 0:979565e955a5
- Child:
- 1:add7d2b18162
- Child:
- 9:a30169882a15
diff -r 000000000000 -r 979565e955a5 omni.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omni.h Mon Jul 03 14:23:36 2017 +0000 @@ -0,0 +1,27 @@ +#ifndef OMNI +#define OMNI + +#include "mbed.h" + +#define M_PI 3.141592653589793 + +class Omni { +public: + Omni(int wheels, double initDegree); + + bool computeXY(double parallelVector[], double moment); + bool computePolar(double parallelVector[], double moment); + bool stop(); + + void setWheels(int wheel); + void setInitDegree(double degree); + + double getOutput(int wheel); + +private: + int wheels; + double initDegree; + double wheel[4]; +}; + +#endif