omni wheel library
Dependents: quadOmni_yanagi NHK2017_octopus hayatoShooter
オムニ用のライブラリです。
omni.h@0:979565e955a5, 2017-07-03 (annotated)
- Committer:
- UCHITAKE
- Date:
- Mon Jul 03 14:23:36 2017 +0000
- Revision:
- 0:979565e955a5
- Child:
- 1:add7d2b18162
- Child:
- 9:a30169882a15
first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
UCHITAKE | 0:979565e955a5 | 1 | #ifndef OMNI |
UCHITAKE | 0:979565e955a5 | 2 | #define OMNI |
UCHITAKE | 0:979565e955a5 | 3 | |
UCHITAKE | 0:979565e955a5 | 4 | #include "mbed.h" |
UCHITAKE | 0:979565e955a5 | 5 | |
UCHITAKE | 0:979565e955a5 | 6 | #define M_PI 3.141592653589793 |
UCHITAKE | 0:979565e955a5 | 7 | |
UCHITAKE | 0:979565e955a5 | 8 | class Omni { |
UCHITAKE | 0:979565e955a5 | 9 | public: |
UCHITAKE | 0:979565e955a5 | 10 | Omni(int wheels, double initDegree); |
UCHITAKE | 0:979565e955a5 | 11 | |
UCHITAKE | 0:979565e955a5 | 12 | bool computeXY(double parallelVector[], double moment); |
UCHITAKE | 0:979565e955a5 | 13 | bool computePolar(double parallelVector[], double moment); |
UCHITAKE | 0:979565e955a5 | 14 | bool stop(); |
UCHITAKE | 0:979565e955a5 | 15 | |
UCHITAKE | 0:979565e955a5 | 16 | void setWheels(int wheel); |
UCHITAKE | 0:979565e955a5 | 17 | void setInitDegree(double degree); |
UCHITAKE | 0:979565e955a5 | 18 | |
UCHITAKE | 0:979565e955a5 | 19 | double getOutput(int wheel); |
UCHITAKE | 0:979565e955a5 | 20 | |
UCHITAKE | 0:979565e955a5 | 21 | private: |
UCHITAKE | 0:979565e955a5 | 22 | int wheels; |
UCHITAKE | 0:979565e955a5 | 23 | double initDegree; |
UCHITAKE | 0:979565e955a5 | 24 | double wheel[4]; |
UCHITAKE | 0:979565e955a5 | 25 | }; |
UCHITAKE | 0:979565e955a5 | 26 | |
UCHITAKE | 0:979565e955a5 | 27 | #endif |