Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: IMU mbed Odometer PID MDD RotaryEncoder UART Mycan DriveConroller
Diff: hardwareConfig.h
- Revision:
- 1:0f33a68d1390
- Parent:
- 0:56a2c0ed99c5
diff -r 56a2c0ed99c5 -r 0f33a68d1390 hardwareConfig.h --- a/hardwareConfig.h Mon Oct 21 14:25:38 2019 +0000 +++ b/hardwareConfig.h Sun Jan 12 08:12:42 2020 +0000 @@ -5,7 +5,6 @@ #include "Mycan.h" #include "Odometer.h" #include "PID.h" -#include "PID_VEL.h" #include "RotaryEncoder.h" #include "SplineCurve.h" #include "SBUS.h" @@ -37,7 +36,7 @@ //デバック用シリアル Serial pc(USBTX, USBRX); -//メカナム逆運動学モデルのヤコビアン +//逆運動学モデルのヤコビアン float jacobian[4][3] = {{ 0.7071, -0.7071, -1}, { 0.7071, 0.7071, -1}, {-0.7071, 0.7071, -1}, @@ -71,33 +70,29 @@ } controller; //x軸補正用 PID -//PID pidRobotX(0.8, 0.0, 0.085, PID_PERIOD, 0.50, &timer); -//PID pidRobotX(0.95, 0.0, 0.082, PID_PERIOD, 0.40, &timer); -PID pidRobotX(P_GAIN, 0, 0.23, PID_PERIOD, 0.3, &timer); -float target_x = 0; +//PID pidRobotX(0.8, 0.0, 0.085, PID_PERIOD, 0.50, 0.08, false, &timer); +//PID pidRobotX(0.95, 0.0, 0.082, PID_PERIOD, 0.40, 0.08, false, &timer); +PID pidRobotX(P_GAIN, 0, 0.23, PID_PERIOD, 0.3, 0.08, false, &timer); //y軸補正用 PID -//PID pidRobotY(0.8, 0.0, 0.085, PID_PERIOD, 0.50, &timer); -//PID pidRobotY(0.95, 0.0, 0.082, PID_PERIOD, 0.40, &timer); -PID pidRobotY(P_GAIN, 0, 0.23, PID_PERIOD, 0.3, &timer); -float target_y = 0; +//PID pidRobotY(0.8, 0.0, 0.085, PID_PERIOD, 0.50, 0.08, false, &timer); +//PID pidRobotY(0.95, 0.0, 0.082, PID_PERIOD, 0.40, 0.08, false, &timer); +PID pidRobotY(P_GAIN, 0, 0.23, PID_PERIOD, 0.3, 0.08, false, &timer); //yaw角補正用 (Pgain, Igain, Dgain, 制御ループ時間[s], 計算出力100%定義) -//PID pidRobotYaw(0.009, 0, 0.00015, PID_PERIOD, 0.12, &timer); -PID pidRobotYaw(0.009, 0, 0.00015, PID_PERIOD, 0.12, &timer); -float target_yaw = 0; +//PID pidRobotYaw(0.009, 0, 0.00015, PID_PERIOD, 0.12, false, &timer); +PID pidRobotYaw(0.009, 0, 0.00015, PID_PERIOD, 0.12, 4, false, &timer); //昇降機構PID -PID pidLift(3.5, 0, 0.04, PID_PERIOD, 0.9, &timer); +PID pidLift(3.5, 0, 0.04, PID_PERIOD, 0.9, 0.05, false, &timer); +//PID pidVelLift(0, 0, 0, PID_PERIOD, 1.0, 0.5, true, &timer); float target_lift = 0; //幅可変機構PID -PID pidWide(3.5, 0, 0.01, PID_PERIOD, 0.95, &timer); -float target_wide = 0; +PID pidWide(3.5, 0, 0.01, PID_PERIOD, 0.95, 0.075, false, &timer); //装填機構PID -PID pidSupply(4.0, 0, 0, PID_PERIOD, 0.95, &timer); -float target_supply = 0; +PID pidSupply(4.0, 0, 0, PID_PERIOD, 0.95, 0.075, false, &timer); /* //ホイール速度MAX4.72[m/s] float wheel_rps[4], robot_max_sp = 1.18, robot_speed, wheel_speed[4], error_speed[4];