Octopus!!

Dependencies:   2017NHKpin_config FEP HMC6352 PID QEI R1307 ikarashiMDC omni_wheel

Fork of KANIv3 by NagaokaRoboticsClub_mbedTeam

Committer:
number_key
Date:
Thu Nov 23 11:49:39 2017 +0900
Revision:
52:320f910ca6ca
Parent:
50:3a7c858aa0f9
dirty

Who changed what in which revision?

UserRevisionLine numberNew contents of line
uchitake 1:845af5425eec 1 /**
uchitake 1:845af5425eec 2 * @file bot.h
uchitake 1:845af5425eec 3 * @brief ロボットのクラス
uchitake 1:845af5425eec 4 */
uchitake 1:845af5425eec 5 #ifndef BOT_H
uchitake 1:845af5425eec 6 #define BOT_H
uchitake 1:845af5425eec 7
uchitake 1:845af5425eec 8 #include "mbed.h"
number_key 50:3a7c858aa0f9 9 #include "math.h"
uchitake 1:845af5425eec 10 #include "pin_config.h"
uchitake 1:845af5425eec 11 #include "controller.h"
uchitake 1:845af5425eec 12 #include "PID_controller.h"
number_key 49:69a7235d837a 13 #include "tentacle_unit.h"
number_key 49:69a7235d837a 14 #include "elevator.h"
number_key 49:69a7235d837a 15 #include "sword_unit.h"
uchitake 9:39be1525dfe0 16 #include "wheel_unit.h"
number_key 49:69a7235d837a 17 #include "def.h"
uchitake 1:845af5425eec 18
uchitake 28:676330f1d186 19 const float ADJUST_DEGREE = 5.0;
uchitake 1:845af5425eec 20 /**
uchitake 1:845af5425eec 21 * @brief ロボットのクラス
uchitake 1:845af5425eec 22 */
takeuchi 32:b619c7787dc3 23 class Bot
uchitake 1:845af5425eec 24 {
uchitake 1:845af5425eec 25 public :
uchitake 1:845af5425eec 26 /**
uchitake 1:845af5425eec 27 * @brief コンストラクタ
uchitake 1:845af5425eec 28 */
uchitake 1:845af5425eec 29 Bot();
uchitake 1:845af5425eec 30
uchitake 1:845af5425eec 31 /**
uchitake 1:845af5425eec 32 * @brief センサなどの値を更新
uchitake 1:845af5425eec 33 */
number_key 49:69a7235d837a 34 void confirmPad1();
number_key 49:69a7235d837a 35 void confirmPad2();
uchitake 1:845af5425eec 36
uchitake 1:845af5425eec 37 /**
uchitake 1:845af5425eec 38 * @brief 足回りの制御
uchitake 1:845af5425eec 39 */
uchitake 1:845af5425eec 40 void controllDrive();
uchitake 3:369d9ee17e84 41 void controllDrive2();
uchitake 17:79fa65706f92 42 void controllDrive3();
takeuchi 41:ae6f844facb1 43 void controllDrive4();
uchitake 1:845af5425eec 44
uchitake 1:845af5425eec 45 /**
uchitake 1:845af5425eec 46 * @brief 機構部の制御
uchitake 1:845af5425eec 47 */
uchitake 1:845af5425eec 48 void controllMech();
uchitake 3:369d9ee17e84 49
uchitake 18:78df87e20590 50 /**
uchitake 18:78df87e20590 51 * センサのキャリブレーション
uchitake 18:78df87e20590 52 */
uchitake 1:845af5425eec 53 void calibrate();
uchitake 1:845af5425eec 54
number_key 49:69a7235d837a 55 void checkConnection();
number_key 49:69a7235d837a 56
number_key 49:69a7235d837a 57 void checkDegree();
number_key 49:69a7235d837a 58
number_key 52:320f910ca6ca 59 void checkPacket();
number_key 52:320f910ca6ca 60
number_key 52:320f910ca6ca 61 void checkReceiveData();
number_key 52:320f910ca6ca 62
uchitake 1:845af5425eec 63 private :
number_key 49:69a7235d837a 64 Controller pad1;
number_key 49:69a7235d837a 65 Controller pad2;
uchitake 9:39be1525dfe0 66 Serial RS485;
uchitake 9:39be1525dfe0 67 DigitalOut RS485Controller;
uchitake 9:39be1525dfe0 68 DigitalOut powerSwitch;
uchitake 9:39be1525dfe0 69 WheelUnit quadOmni;
number_key 49:69a7235d837a 70 Tentacle tentacle;
number_key 49:69a7235d837a 71 Elevator nishijoSword;
number_key 49:69a7235d837a 72 Sword nishijo;
takeuchi 32:b619c7787dc3 73 PIDC plane;
takeuchi 32:b619c7787dc3 74 PIDC axis;
number_key 52:320f910ca6ca 75 int receiveSuccessed1;
number_key 52:320f910ca6ca 76 int receiveSuccessed2;
uchitake 28:676330f1d186 77 float frontDegree;
uchitake 5:16ea97725085 78 Serial debugSerial;
uchitake 19:34da005ea4ea 79 Timer t;
uchitake 1:845af5425eec 80 };
uchitake 1:845af5425eec 81
uchitake 1:845af5425eec 82 #endif//BOT_H