改良版位置補正プログラム動作未確認
Dependencies: mbed move4wheel2 EC CruizCore_R1370P
pathfollowing/PathFollowing.h@6:26724c287387, 2019-03-02 (annotated)
- Committer:
- la00noix
- Date:
- Sat Mar 02 07:48:18 2019 +0000
- Revision:
- 6:26724c287387
- Parent:
- 0:c61c6e4775ca
a
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
la00noix | 0:c61c6e4775ca | 1 | #ifndef HARUROBO2019_PATHFOLLOWING |
la00noix | 0:c61c6e4775ca | 2 | #define HARUROBO2019_PATHFOLLOWING |
la00noix | 0:c61c6e4775ca | 3 | |
la00noix | 0:c61c6e4775ca | 4 | extern double now_x,now_y,now_angle; //main.cppにこれらの値の読み込みを書くこと |
la00noix | 0:c61c6e4775ca | 5 | extern double now_timeQ,now_timeR; |
la00noix | 0:c61c6e4775ca | 6 | extern double usw_data1,usw_data2,usw_data3,usw_data4; |
la00noix | 0:c61c6e4775ca | 7 | |
la00noix | 0:c61c6e4775ca | 8 | void XYRmotorout(double plot_x1, double plot_y1, double plot_x2, double plot_y2, double *ad_x_out, double *ad_y_out, double *ad_r_out,double speed1,double speed2); |
la00noix | 0:c61c6e4775ca | 9 | //出発地点、目標地点の座標から機体のx軸方向、y軸方向、旋回の出力を算出する関数 |
la00noix | 0:c61c6e4775ca | 10 | /* |
la00noix | 0:c61c6e4775ca | 11 | *1.main分内でx_out,y_out,r_outをdouble型で定義 |
la00noix | 0:c61c6e4775ca | 12 | *2.XYRmotorout関数使用時は、num番目のx、y座標、num+1番目のx,y座標に加え、 |
la00noix | 0:c61c6e4775ca | 13 | x_out,y_out,r_outのアドレス(&x_out,&y_out,&r_out)を渡す→(XYRmotorout(座標×4つ,&x_out,&y_out,&r_out)) |
la00noix | 0:c61c6e4775ca | 14 | */ |
la00noix | 0:c61c6e4775ca | 15 | |
la00noix | 0:c61c6e4775ca | 16 | //次の関数のパラメーターを定義すること |
la00noix | 0:c61c6e4775ca | 17 | |
la00noix | 0:c61c6e4775ca | 18 | //void set_p_out(double p); |
la00noix | 0:c61c6e4775ca | 19 | //ベクトルABに平行方向の出力値設定関数 |
la00noix | 0:c61c6e4775ca | 20 | |
la00noix | 0:c61c6e4775ca | 21 | void q_setPDparam(double q_p,double q_d); |
la00noix | 6:26724c287387 | 22 | //ベクトルABに垂直な方向の誤差を埋めるPD制御のパラメータ設定関数 |
la00noix | 0:c61c6e4775ca | 23 | |
la00noix | 0:c61c6e4775ca | 24 | void r_setPDparam(double r_p,double r_d); |
la00noix | 0:c61c6e4775ca | 25 | //機体角度と目標角度の誤差を埋めるPD制御のパラメータ設定関数 |
la00noix | 0:c61c6e4775ca | 26 | |
la00noix | 0:c61c6e4775ca | 27 | void set_r_out(double r); |
la00noix | 0:c61c6e4775ca | 28 | //旋回時の最大出力値設定関数 |
la00noix | 0:c61c6e4775ca | 29 | |
la00noix | 0:c61c6e4775ca | 30 | void set_target_angle(double t); |
la00noix | 0:c61c6e4775ca | 31 | //機体目標角度設定関数 |
la00noix | 0:c61c6e4775ca | 32 | |
la00noix | 0:c61c6e4775ca | 33 | #endif |