• R/O
  • SSH
  • HTTPS

team-ncxx-sl: Commit


Commit MetaInfo

Revision402 (tree)
Time2018-08-25 17:21:48
Authorono0617

Log Message

(empty log message)

Change Summary

Incremental Difference

--- trunk/src/hrp2_beta7/sdk/workspace/sample_cpp2/course/StartToGoalL.cpp (revision 401)
+++ trunk/src/hrp2_beta7/sdk/workspace/sample_cpp2/course/StartToGoalL.cpp (revision 402)
@@ -37,10 +37,12 @@
3737 //C地点からD地点まで カーブ
3838 mode = Curve2;
3939 }
40- else if(totalAvg < 7800) {
40+ // 要速度調整
41+ else if(totalAvg < 7650) {
4142 //D地点からE地点まで ストレート
42- mode = Straight;
43+ mode = Curve2_3;
4344 }
45+ // 要PID制御調整
4446 else if(totalAvg < 8600) {
4547 //E地点からF地点まで カーブ
4648 mode = Curve3;
@@ -55,6 +57,7 @@
5557 // 次モードのforward値
5658 minSpeed = 90;
5759 }
60+ // 要PID制御調整
5861 else if(totalAvg < 12000) {
5962 //G地点からH地点まで カーブ
6063 mode = Curve4;
@@ -99,17 +102,23 @@
99102 /*PID制御処理呼び出し
100103 modeによる適正値を設定し、PID制御呼び出し*/
101104 void StartToGoalL::SetPIDData() {
102- if(mode == Straight || mode == FirstStraight || mode == SpeedDown) {
105+ if(mode == Straight || mode == FirstStraight || mode == SpeedDown || mode == Curve2_3) {
103106 PIDMgr->SetFixedData(0.5, 0, 0.03);
104107 }
105108 else if(mode == SpeedDown2) {
106109 PIDMgr->SetFixedData(1, 0, 0.03);
107110 }
108- else if(mode == Curve4){
109- PIDMgr->SetFixedData(1.4, 1, 0.05);
111+ else if(mode == Curve){
112+ PIDMgr->SetFixedData(0.5, 0.1, 0.03);
110113 }
114+ else if(mode == Curve2){
115+ PIDMgr->SetFixedData(1, 0.8, 0.06);
116+ }
117+ else if(mode == Curve3 || mode == Curve4){
118+ PIDMgr->SetFixedData(1.2, 1, 0.08);
119+ }
111120 else{
112- PIDMgr->SetFixedData(1.2, 0.8, 0.05);
121+ PIDMgr->SetFixedData(1, 0.3, 0.06);
113122 }
114123 }
115124
@@ -135,6 +144,9 @@
135144 else if(mode == Curve2) {
136145 forward = 70;
137146 }
147+ else if(mode == Curve2_3){
148+ forward = 70;
149+ }
138150 else if(mode == Curve3) {
139151 forward = 60;
140152 }
--- trunk/src/hrp2_beta7/sdk/workspace/sample_cpp2/course/StartToGoalL.h (revision 401)
+++ trunk/src/hrp2_beta7/sdk/workspace/sample_cpp2/course/StartToGoalL.h (revision 402)
@@ -23,6 +23,7 @@
2323 SpeedDown2,
2424 Curve,
2525 Curve2,
26+ Curve2_3,
2627 Curve3,
2728 Curve4
2829 };
Show on old repository browser