test
Dependencies: mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM
Diff: main.cpp
- Revision:
- 36:b0edccff7457
- Parent:
- 35:b4e1b8f25cd7
- Child:
- 37:e4b37af4d8c7
diff -r b4e1b8f25cd7 -r b0edccff7457 main.cpp --- a/main.cpp Mon Mar 04 09:54:47 2019 +0000 +++ b/main.cpp Mon Mar 04 09:56:52 2019 +0000 @@ -10,7 +10,7 @@ #include "pi.h" #include "can.h" #define USE_CAN //can通信するならdefine.しないなら切らないとエラー出る -//#define USE_ROS +#define USE_ROS #include <ros.h> #include <geometry_msgs/Vector3.h> #endif @@ -159,8 +159,11 @@ nh_mbed.getHardware()->setBaud(115200); nh_mbed.initNode(); nh_mbed.subscribe(sub_vel); - while (1) + while (1){ nh_mbed.spinOnce(); + SetWalk(walk, LRFPOSTURE); + MoveOneCycle(walk, leg); + } #else if (SetWalk(walk, FRONTLEG_ON_SANDDUNE) == 1) @@ -302,7 +305,6 @@ stride_m[LEFT_B] = 0.2; stride_m[RIGHT_B] = 0.2; } - SetWalk(walk, LRFPOSTURE); - MoveOneCycle(walk, leg); + } #endif \ No newline at end of file