my new gear...

Dependencies:   mbed

Committer:
yootee
Date:
Sat Apr 09 03:20:19 2022 +0000
Revision:
6:e7f2335456c8
Parent:
2:e7b09385d197
highwaystar

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yootee 0:1456b6f84c75 1 //--Self-localization Estimate--//
yootee 0:1456b6f84c75 2 /* AMT102v*4つを用いてXY座標の自己位置推定(Self-localization Estimate)するライブラリ.4輪を前後左右4方向に均等に配置している場合のみ使える(要はベタな4輪オムニ自動機ならこれ使える).*/
yootee 6:e7f2335456c8 3 /*
yootee 6:e7f2335456c8 4 encoder position
yootee 6:e7f2335456c8 5 front
yootee 6:e7f2335456c8 6 0
yootee 6:e7f2335456c8 7 1 2
yootee 6:e7f2335456c8 8 3
yootee 6:e7f2335456c8 9 */
yootee 0:1456b6f84c75 10 #pragma once
yootee 0:1456b6f84c75 11 #include <mbed.h>
yootee 0:1456b6f84c75 12 #include <portSet.hpp>
yootee 0:1456b6f84c75 13 #include <rotary_inc_sp.hpp>
yootee 0:1456b6f84c75 14
yootee 0:1456b6f84c75 15 #define NOW 0
yootee 0:1456b6f84c75 16 #define PREV 1
yootee 0:1456b6f84c75 17 #define X_DATA 0
yootee 0:1456b6f84c75 18 #define Y_DATA 1
yootee 0:1456b6f84c75 19
yootee 0:1456b6f84c75 20 class SLE
yootee 0:1456b6f84c75 21 {
yootee 0:1456b6f84c75 22 public:
yootee 6:e7f2335456c8 23 SLE(Port enc0,Port enc1,Port enc2,Port enc3,int resolution,float ensyu,float interval);
yootee 0:1456b6f84c75 24 void update(double theta);
yootee 0:1456b6f84c75 25 void reset();
yootee 0:1456b6f84c75 26 void setPos(float x_pos,float y_pos);
yootee 0:1456b6f84c75 27 float position[2];
yootee 0:1456b6f84c75 28 float velocity[2];
yootee 0:1456b6f84c75 29 RotaryInc odometer[4];
yootee 0:1456b6f84c75 30 private:
yootee 0:1456b6f84c75 31 float wheel_ensyu;
yootee 0:1456b6f84c75 32 float dt;
yootee 0:1456b6f84c75 33 float Vx[2],Vy[2];
yootee 0:1456b6f84c75 34 };