Octopus!!

Dependencies:   2017NHKpin_config FEP HMC6352 PID QEI R1307 ikarashiMDC omni_wheel

Fork of KANIv3 by NagaokaRoboticsClub_mbedTeam

Committer:
number_key
Date:
Mon Nov 13 17:33:30 2017 +0900
Revision:
50:3a7c858aa0f9
Parent:
49:69a7235d837a
Child:
51:64534e908d5c
Child:
52:320f910ca6ca
no arms

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
uchitake 1:845af5425eec 59 private :
number_key 49:69a7235d837a 60 Controller pad1;
number_key 49:69a7235d837a 61 Controller pad2;
uchitake 9:39be1525dfe0 62 Serial RS485;
uchitake 9:39be1525dfe0 63 DigitalOut RS485Controller;
uchitake 9:39be1525dfe0 64 DigitalOut powerSwitch;
uchitake 9:39be1525dfe0 65 WheelUnit quadOmni;
number_key 49:69a7235d837a 66 Tentacle tentacle;
number_key 49:69a7235d837a 67 Elevator nishijoSword;
number_key 49:69a7235d837a 68 Sword nishijo;
takeuchi 32:b619c7787dc3 69 PIDC plane;
takeuchi 32:b619c7787dc3 70 PIDC axis;
number_key 49:69a7235d837a 71 bool receiveSuccessed1;
number_key 49:69a7235d837a 72 bool receiveSuccessed2;
uchitake 28:676330f1d186 73 float frontDegree;
uchitake 5:16ea97725085 74 Serial debugSerial;
uchitake 19:34da005ea4ea 75 Timer t;
uchitake 1:845af5425eec 76 };
uchitake 1:845af5425eec 77
uchitake 1:845af5425eec 78 #endif//BOT_H