Octopus!!
Dependencies: 2017NHKpin_config FEP HMC6352 PID QEI R1307 ikarashiMDC omni_wheel
Fork of KANIv3 by
bot/bot.h@1:845af5425eec, 2017-09-05 (annotated)
- Committer:
- uchitake
- Date:
- Tue Sep 05 16:11:20 2017 +0900
- Revision:
- 1:845af5425eec
- Child:
- 3:369d9ee17e84
mbed-os5
Who changed what in which revision?
User | Revision | Line number | New 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 "motor_driver.h" |
uchitake |
1:845af5425eec | 11 | #include "controller.h" |
uchitake |
1:845af5425eec | 12 | #include "PID_controller.h" |
uchitake |
1:845af5425eec | 13 | |
uchitake |
1:845af5425eec | 14 | #define ARM_MAX_SPEED 1 |
uchitake |
1:845af5425eec | 15 | #define DESTROY_MAX_SPEED 1 |
uchitake |
1:845af5425eec | 16 | |
uchitake |
1:845af5425eec | 17 | /** |
uchitake |
1:845af5425eec | 18 | * @brief ロボットのクラス |
uchitake |
1:845af5425eec | 19 | */ |
uchitake |
1:845af5425eec | 20 | class Bot : public PIDC |
uchitake |
1:845af5425eec | 21 | { |
uchitake |
1:845af5425eec | 22 | public : |
uchitake |
1:845af5425eec | 23 | /** |
uchitake |
1:845af5425eec | 24 | * @brief コンストラクタ |
uchitake |
1:845af5425eec | 25 | */ |
uchitake |
1:845af5425eec | 26 | Bot(); |
uchitake |
1:845af5425eec | 27 | |
uchitake |
1:845af5425eec | 28 | /** |
uchitake |
1:845af5425eec | 29 | * @brief センサなどの値を更新 |
uchitake |
1:845af5425eec | 30 | */ |
uchitake |
1:845af5425eec | 31 | void confirmAll(); |
uchitake |
1:845af5425eec | 32 | |
uchitake |
1:845af5425eec | 33 | /** |
uchitake |
1:845af5425eec | 34 | * @brief 足回りの制御 |
uchitake |
1:845af5425eec | 35 | */ |
uchitake |
1:845af5425eec | 36 | void controllDrive(); |
uchitake |
1:845af5425eec | 37 | |
uchitake |
1:845af5425eec | 38 | /** |
uchitake |
1:845af5425eec | 39 | * @brief 機構部の制御 |
uchitake |
1:845af5425eec | 40 | */ |
uchitake |
1:845af5425eec | 41 | void controllMech(); |
uchitake |
1:845af5425eec | 42 | |
uchitake |
1:845af5425eec | 43 | void calibrate(); |
uchitake |
1:845af5425eec | 44 | |
uchitake |
1:845af5425eec | 45 | private : |
uchitake |
1:845af5425eec | 46 | Controller pad; |
uchitake |
1:845af5425eec | 47 | MotorDriver motor; |
uchitake |
1:845af5425eec | 48 | bool suc; |
uchitake |
1:845af5425eec | 49 | }; |
uchitake |
1:845af5425eec | 50 | |
uchitake |
1:845af5425eec | 51 | #endif//BOT_H |