2月25日

Dependencies:   uw_28015 mbed ros_lib_kinetic move4wheel2 EC CruizCore_R6093U CruizCore_R1370P

Committer:
yuki0701
Date:
Tue Feb 25 01:20:43 2020 +0000
Revision:
0:44f9a43e4ab2
a;

Who changed what in which revision?

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