harurobo_mbed_undercarriage (未動確)

Committer:
yuki0701
Date:
Sat Dec 15 13:22:52 2018 +0000
Revision:
5:babe249ce482
Parent:
4:69775231687c
a;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
la00noix 0:591749f315ac 1 #ifndef HARUROBO2019_PATHFOLLOWING_H
la00noix 0:591749f315ac 2 #define HARUROBO2019_PATHFOLLOWING_H
la00noix 0:591749f315ac 3 #include <EC.h>
la00noix 0:591749f315ac 4
la00noix 0:591749f315ac 5 extern double now_x,now_y,now_angle; //main.cppにこれらの値の読み込みを書くこと
la00noix 0:591749f315ac 6 extern double now_timeQ,now_timeR;
la00noix 0:591749f315ac 7
yuki0701 5:babe249ce482 8
yuki0701 4:69775231687c 9 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);
yuki0701 5:babe249ce482 10 //出発地点、目標地点の座標から機体のx軸方向、y軸方向、旋回の出力を算出する関数(エンコーダ/ジャイロ使用)
la00noix 0:591749f315ac 11 /*
la00noix 0:591749f315ac 12 *1.main分内でx_out,y_out,r_outをdouble型で定義
la00noix 0:591749f315ac 13 *2.XYRmotorout関数使用時は、num番目のx、y座標、num+1番目のx,y座標に加え、
la00noix 0:591749f315ac 14 x_out,y_out,r_outのアドレス(&x_out,&y_out,&r_out)を渡す→(XYRmotorout(座標×4つ,&x_out,&y_out,&r_out))
la00noix 0:591749f315ac 15 */
la00noix 0:591749f315ac 16
la00noix 0:591749f315ac 17 //次の関数のパラメーターを定義すること
la00noix 0:591749f315ac 18
yuki0701 4:69775231687c 19 //void set_p_out(double p);
la00noix 0:591749f315ac 20 //ベクトルABに平行方向の出力値設定関数
la00noix 0:591749f315ac 21
la00noix 0:591749f315ac 22 void q_setPDparam(double q_p,double q_d);
la00noix 0:591749f315ac 23 //ベクトルABに垂直な方向の誤差を埋めるPD制御のパラメータ設定関数
la00noix 0:591749f315ac 24
la00noix 0:591749f315ac 25 void r_setPDparam(double r_p,double r_d);
la00noix 0:591749f315ac 26 //機体角度と目標角度の誤差を埋めるPD制御のパラメータ設定関数
la00noix 0:591749f315ac 27
la00noix 0:591749f315ac 28 void set_r_out(double r);
la00noix 0:591749f315ac 29 //旋回時の最大出力値設定関数
la00noix 0:591749f315ac 30
la00noix 0:591749f315ac 31 void set_target_angle(double t);
la00noix 0:591749f315ac 32 //機体目標角度設定関数
la00noix 0:591749f315ac 33
la00noix 0:591749f315ac 34
la00noix 0:591749f315ac 35
la00noix 0:591749f315ac 36 #endif