タコ 駆動側 

Dependencies:   2017NHKpin_config FEP R1307 PID ikarashiMDC omni_wheel

Fork of NHK2017_octopus2 by NagaokaRoboticsClub_mbedTeam

Committer:
number_key
Date:
Mon Nov 13 17:34:01 2017 +0900
Revision:
51:64534e908d5c
Parent:
50:3a7c858aa0f9
Backout changeset 3a7c858aa0f973d081ff06fd37568bbd511ebbf8

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"
uchitake 1:845af5425eec 9 #include "pin_config.h"
uchitake 1:845af5425eec 10 #include "controller.h"
uchitake 1:845af5425eec 11 #include "PID_controller.h"
number_key 49:69a7235d837a 12 #include "tentacle_unit.h"
number_key 49:69a7235d837a 13 #include "elevator.h"
number_key 49:69a7235d837a 14 #include "sword_unit.h"
uchitake 9:39be1525dfe0 15 #include "wheel_unit.h"
number_key 49:69a7235d837a 16 #include "def.h"
uchitake 1:845af5425eec 17
uchitake 28:676330f1d186 18 const float ADJUST_DEGREE = 5.0;
uchitake 1:845af5425eec 19 /**
uchitake 1:845af5425eec 20 * @brief ロボットのクラス
uchitake 1:845af5425eec 21 */
takeuchi 32:b619c7787dc3 22 class Bot
uchitake 1:845af5425eec 23 {
uchitake 1:845af5425eec 24 public :
uchitake 1:845af5425eec 25 /**
uchitake 1:845af5425eec 26 * @brief コンストラクタ
uchitake 1:845af5425eec 27 */
uchitake 1:845af5425eec 28 Bot();
uchitake 1:845af5425eec 29
uchitake 1:845af5425eec 30 /**
uchitake 1:845af5425eec 31 * @brief センサなどの値を更新
uchitake 1:845af5425eec 32 */
number_key 49:69a7235d837a 33 void confirmPad1();
number_key 49:69a7235d837a 34 void confirmPad2();
uchitake 1:845af5425eec 35
uchitake 1:845af5425eec 36 /**
uchitake 1:845af5425eec 37 * @brief 足回りの制御
uchitake 1:845af5425eec 38 */
uchitake 1:845af5425eec 39 void controllDrive();
uchitake 3:369d9ee17e84 40 void controllDrive2();
uchitake 17:79fa65706f92 41 void controllDrive3();
takeuchi 41:ae6f844facb1 42 void controllDrive4();
uchitake 1:845af5425eec 43
uchitake 1:845af5425eec 44 /**
uchitake 1:845af5425eec 45 * @brief 機構部の制御
uchitake 1:845af5425eec 46 */
uchitake 1:845af5425eec 47 void controllMech();
uchitake 3:369d9ee17e84 48
uchitake 18:78df87e20590 49 /**
uchitake 18:78df87e20590 50 * センサのキャリブレーション
uchitake 18:78df87e20590 51 */
uchitake 1:845af5425eec 52 void calibrate();
uchitake 1:845af5425eec 53
number_key 49:69a7235d837a 54 void checkConnection();
number_key 49:69a7235d837a 55
number_key 49:69a7235d837a 56 void checkDegree();
number_key 49:69a7235d837a 57
uchitake 1:845af5425eec 58 private :
number_key 49:69a7235d837a 59 Controller pad1;
number_key 49:69a7235d837a 60 Controller pad2;
uchitake 9:39be1525dfe0 61 Serial RS485;
uchitake 9:39be1525dfe0 62 DigitalOut RS485Controller;
uchitake 9:39be1525dfe0 63 DigitalOut powerSwitch;
uchitake 9:39be1525dfe0 64 WheelUnit quadOmni;
number_key 49:69a7235d837a 65 Tentacle tentacle;
number_key 49:69a7235d837a 66 Elevator nishijoSword;
number_key 49:69a7235d837a 67 Sword nishijo;
takeuchi 32:b619c7787dc3 68 PIDC plane;
takeuchi 32:b619c7787dc3 69 PIDC axis;
number_key 49:69a7235d837a 70 bool receiveSuccessed1;
number_key 49:69a7235d837a 71 bool receiveSuccessed2;
uchitake 28:676330f1d186 72 float frontDegree;
number_key 51:64534e908d5c 73 DigitalOut led[3];
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