test

Dependencies:   mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM

Revision:
30:32785b3c19f8
Parent:
28:8e1cbeffe6c2
--- a/main.cpp	Wed Feb 27 01:25:01 2019 +0000
+++ b/main.cpp	Wed Feb 27 03:05:43 2019 +0000
@@ -117,8 +117,10 @@
 Walk walks[END]; //歩行法
 int main()
 {
+#ifndef USE_ROS
     if (FileOpen()) //csv fileに書き込み
         return 1;   //異常終了したら強制終了
+#endif
     DEBUG("param set start");
     ParamsSetup(walks, leg);      //各動きの際の足の軌道を設定。パラメータはこの関数内に打ち込む
     for (int i = 0; i < END; i++) //軌道のチェック
@@ -174,11 +176,13 @@
 #endif
         MoveServo(leg[0], 0, 1);
         MoveServo(leg[1], 1, 1);
+#ifndef USE_ROS
         //ファイルに書き込み。time[s],x[0],y[0],x[1],y[1],x[2],y[2],x[3],y[3]の順
         fprintf(fp, "%f", i * walkway.calctime_s_);
         for (int i = 0; i < 4; i++)
             fprintf(fp, ",%f,%f", leg[i].GetX_m(), leg[i].GetY_m());
         fprintf(fp, "\r\n");
+#endif
 #ifndef VSCODE
         //計算周期がwalkway.calctime_s_になるようwait
         float rest_time_s = walkway.calctime_s_ - (timer.read() - time_s);