RobocupSSLのメイン基板白mbedのプログラム
Rootsロボット mainプログラム
~ Robocup SSL(小型車輪リーグ)ロボット ~
Robocup SSLとは
●試合構成
Robocup小型ロボットリーグ(Small Size League)は,直径180[mm],高さ150[mm]以内のサイズのロボット6台が1チームとなり,オレンジ色のゴルフボールを使ってサッカー競技を行う自立型ロボットコンテストである.
フィールドの上には2台のWebカメラが設置され,フィールド上のロボットとボールを撮影する.Visionサーバは,フィールドの画像データよりロボットとボールの座標データを算出し,LANを用い各チームのAI用PCに送信する.Webカメラの撮影速度は,60[fps]である.レフリーボックスは,ファウルやフリーキック,スローインなどの審判の判定を入力し,LANを通じて各チームのAI用PCに送信する.それぞれのチームのAI用PCは,ロボットとボールの座標,審判の判定を元にロボットの移動,キックなどの作戦を決定し,無線によってロボットに指令を送信する.
ロボット機能紹介
●オムニホイールによる方向転換不要の全方位移動
オムニホイールは,自由に回転可能なローラをホイールの外周上に配置した車輪である.ローラの回転により,車輪の回転と垂直の方向に駆動力を発することはできないが移動は可能となる.各車輪の角速度を調整することによって全方向への移動を可能にする.
●ドリブルバーのバックスピンによるボール保持
●電磁力を利用したキッカー
●キッカーの電磁力エネルギーを充電する充電回路
●ロボット情報が一目でわかるLCD
actuator/wheel.h@17:e5e7b19dd707, 2017-05-05 (annotated)
- Committer:
- alt0710
- Date:
- Fri May 05 09:56:27 2017 +0000
- Revision:
- 17:e5e7b19dd707
- Parent:
- 7:1f1bdb4e4f33
- Child:
- 34:857b6cca2021
LSB?????????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
alt0710 | 7:1f1bdb4e4f33 | 1 | #ifndef WHEEL_ROOTS_H |
alt0710 | 7:1f1bdb4e4f33 | 2 | #define WHEEL_ROOTS_H |
alt0710 | 7:1f1bdb4e4f33 | 3 | |
alt0710 | 7:1f1bdb4e4f33 | 4 | /* **Include** */ |
alt0710 | 7:1f1bdb4e4f33 | 5 | #include "mbed.h" |
alt0710 | 7:1f1bdb4e4f33 | 6 | #include "comm.h" |
alt0710 | 7:1f1bdb4e4f33 | 7 | #include "typedef.h" |
alt0710 | 7:1f1bdb4e4f33 | 8 | #include "interface_manager.h" |
alt0710 | 7:1f1bdb4e4f33 | 9 | #include "status_manager.h" |
alt0710 | 7:1f1bdb4e4f33 | 10 | |
alt0710 | 7:1f1bdb4e4f33 | 11 | /* **Define** */ |
alt0710 | 7:1f1bdb4e4f33 | 12 | #define DEG2RAD 0.01745329251 // π/180 = 0.01745329251 |
alt0710 | 7:1f1bdb4e4f33 | 13 | #define RAD2DEG 57.2957795130 // 180/π = 57.2957795130 |
alt0710 | 7:1f1bdb4e4f33 | 14 | |
alt0710 | 7:1f1bdb4e4f33 | 15 | /* **変数定義** */ |
alt0710 | 17:e5e7b19dd707 | 16 | #ifndef EXCHANGE_REQUEST |
alt0710 | 7:1f1bdb4e4f33 | 17 | const double CONST_MACHINE_RADIUS_ = 0.07; |
alt0710 | 7:1f1bdb4e4f33 | 18 | const double CONST_WHEEL_RADIUS_ = 26; |
alt0710 | 7:1f1bdb4e4f33 | 19 | const double CONST_GEER_RATIO_ = 2.83; |
alt0710 | 17:e5e7b19dd707 | 20 | #endif |
alt0710 | 17:e5e7b19dd707 | 21 | |
alt0710 | 17:e5e7b19dd707 | 22 | #ifdef EXCHANGE_REQUEST |
alt0710 | 17:e5e7b19dd707 | 23 | const double CONST_MACHINE_RADIUS_ = 0.07; |
alt0710 | 17:e5e7b19dd707 | 24 | const double CONST_WHEEL_RADIUS_ = 28; |
alt0710 | 17:e5e7b19dd707 | 25 | const double CONST_GEER_RATIO_ = 2.4; |
alt0710 | 17:e5e7b19dd707 | 26 | #endif |
alt0710 | 7:1f1bdb4e4f33 | 27 | |
alt0710 | 7:1f1bdb4e4f33 | 28 | const double CONST_V0_COEFFICIENT_VX_ = -0.5, CONST_V0_COEFFICIENT_VY_ = 0.8660254; |
alt0710 | 7:1f1bdb4e4f33 | 29 | const double CONST_V1_COEFFICIENT_VX_ = -0.5, CONST_V1_COEFFICIENT_VY_ = -0.8660254; |
alt0710 | 7:1f1bdb4e4f33 | 30 | const double CONST_V2_COEFFICIENT_VX_ = 1, CONST_V2_COEFFICIENT_VY_ = 0; |
alt0710 | 7:1f1bdb4e4f33 | 31 | const double CONST_V3_COEFFICIENT_VX_ = 2.0000015, CONST_V3_COEFFICIENT_VY_ = 1.15470024; |
alt0710 | 7:1f1bdb4e4f33 | 32 | /* **グルーバル関数** */ |
alt0710 | 7:1f1bdb4e4f33 | 33 | |
alt0710 | 7:1f1bdb4e4f33 | 34 | /* **クラス** */ |
alt0710 | 7:1f1bdb4e4f33 | 35 | class InterfaceManager; |
alt0710 | 7:1f1bdb4e4f33 | 36 | class StatusManager; |
alt0710 | 7:1f1bdb4e4f33 | 37 | |
alt0710 | 7:1f1bdb4e4f33 | 38 | class Wheel{ |
alt0710 | 7:1f1bdb4e4f33 | 39 | public: |
alt0710 | 7:1f1bdb4e4f33 | 40 | Wheel(); |
alt0710 | 7:1f1bdb4e4f33 | 41 | void setVelocity(short V_value, short V_angle, short V_omega); |
alt0710 | 7:1f1bdb4e4f33 | 42 | short getVel_Mot0(void){return order.Mot0Order.Vel_short;} |
alt0710 | 7:1f1bdb4e4f33 | 43 | short getVel_Mot1(void){return order.Mot1Order.Vel_short;} |
alt0710 | 7:1f1bdb4e4f33 | 44 | short getVel_Mot2(void){return order.Mot2Order.Vel_short;} |
alt0710 | 7:1f1bdb4e4f33 | 45 | short getVel_Mot3(void){return order.Mot3Order.Vel_short;} |
alt0710 | 7:1f1bdb4e4f33 | 46 | |
alt0710 | 7:1f1bdb4e4f33 | 47 | private: |
alt0710 | 7:1f1bdb4e4f33 | 48 | OrderMotVel order; |
alt0710 | 7:1f1bdb4e4f33 | 49 | short Vel_Value; |
alt0710 | 7:1f1bdb4e4f33 | 50 | short Vel_Angle; |
alt0710 | 7:1f1bdb4e4f33 | 51 | short Vel_Omega; |
alt0710 | 7:1f1bdb4e4f33 | 52 | |
alt0710 | 7:1f1bdb4e4f33 | 53 | double Vel_X; |
alt0710 | 7:1f1bdb4e4f33 | 54 | double Vel_Y; |
alt0710 | 7:1f1bdb4e4f33 | 55 | double Vel_OMEGA; |
alt0710 | 7:1f1bdb4e4f33 | 56 | |
alt0710 | 7:1f1bdb4e4f33 | 57 | double Vel_Mot0_double; |
alt0710 | 7:1f1bdb4e4f33 | 58 | double Vel_Mot1_double; |
alt0710 | 7:1f1bdb4e4f33 | 59 | double Vel_Mot2_double; |
alt0710 | 7:1f1bdb4e4f33 | 60 | double Vel_Mot3_double; |
alt0710 | 7:1f1bdb4e4f33 | 61 | |
alt0710 | 7:1f1bdb4e4f33 | 62 | void calcWheelVelocity(void); |
alt0710 | 7:1f1bdb4e4f33 | 63 | void convertPhasorToVector(void); |
alt0710 | 7:1f1bdb4e4f33 | 64 | void resolveVector(void); |
alt0710 | 7:1f1bdb4e4f33 | 65 | double operationV0(double vx,double vy, double vw); |
alt0710 | 7:1f1bdb4e4f33 | 66 | double operationV1(double vx,double vy, double vw); |
alt0710 | 7:1f1bdb4e4f33 | 67 | double operationV2(double vx,double vy, double vw); |
alt0710 | 7:1f1bdb4e4f33 | 68 | double operationV3(double vx,double vy, double vw); |
alt0710 | 7:1f1bdb4e4f33 | 69 | |
alt0710 | 7:1f1bdb4e4f33 | 70 | |
alt0710 | 7:1f1bdb4e4f33 | 71 | }; |
alt0710 | 7:1f1bdb4e4f33 | 72 | |
alt0710 | 7:1f1bdb4e4f33 | 73 | |
alt0710 | 7:1f1bdb4e4f33 | 74 | #endif |