harurobo_mbed_undercarriage_sub
Diff: PathFollowing.cpp
- Revision:
- 3:5da150ef209c
- Parent:
- 2:32362343f091
- Child:
- 4:69775231687c
diff -r 32362343f091 -r 5da150ef209c PathFollowing.cpp --- a/PathFollowing.cpp Sat Dec 01 05:17:07 2018 +0000 +++ b/PathFollowing.cpp Tue Dec 04 13:24:20 2018 +0000 @@ -65,11 +65,11 @@ case 2://減速する運動 diff_tgt = hypot(now_x - plot_x2, now_y - plot_y2); - if(diff_tgt > 500) { - diff_tgt = 500; + if(diff_tgt > 300) { + diff_tgt = 300; } - p_param=diff_tgt/500; + p_param=(diff_tgt/300); *ad_x_out = p_param*((VectorOut_P[0]+VectorOut_Q[0])*cos(-now_angle*3.141592/180)-(VectorOut_P[1]+VectorOut_Q[1])*sin(-now_angle*3.141592/180)); *ad_y_out = p_param*((VectorOut_P[0]+VectorOut_Q[0])*sin(-now_angle*3.141592/180)+(VectorOut_P[1]+VectorOut_Q[1])*cos(-now_angle*3.141592/180));