test
Dependencies: mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM
Walk/change_walk.cpp@35:b4e1b8f25cd7, 2019-03-04 (annotated)
- Committer:
- shimizuta
- Date:
- Mon Mar 04 09:54:47 2019 +0000
- Revision:
- 35:b4e1b8f25cd7
- Child:
- 39:87dcdff27797
new MR2;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shimizuta | 35:b4e1b8f25cd7 | 1 | #include "change_walk.h" |
shimizuta | 35:b4e1b8f25cd7 | 2 | void SetOneLegStandParam(Walk &walk, int legnum, float x_m, float y_m, float time_s) |
shimizuta | 35:b4e1b8f25cd7 | 3 | { |
shimizuta | 35:b4e1b8f25cd7 | 4 | Orbit triangle(TRIANGLE); |
shimizuta | 35:b4e1b8f25cd7 | 5 | triangle.SetTriangleParam(x_m, y_m, 0, 0, 0, time_s, 0, 0); |
shimizuta | 35:b4e1b8f25cd7 | 6 | walk.orbit[legnum].Copy(triangle); |
shimizuta | 35:b4e1b8f25cd7 | 7 | } |
shimizuta | 35:b4e1b8f25cd7 | 8 | |
shimizuta | 35:b4e1b8f25cd7 | 9 | void SetAllLegsTriangleParam(Walk &walk, float offset_x_m[4], float offset_y_m[4], |
shimizuta | 35:b4e1b8f25cd7 | 10 | float stride_m[4], float height_m, float buffer_height_m, |
shimizuta | 35:b4e1b8f25cd7 | 11 | float stridetime_s, float toptime_s, float buffer_time_s) |
shimizuta | 35:b4e1b8f25cd7 | 12 | { |
shimizuta | 35:b4e1b8f25cd7 | 13 | |
shimizuta | 35:b4e1b8f25cd7 | 14 | } |
shimizuta | 35:b4e1b8f25cd7 | 15 | |
shimizuta | 35:b4e1b8f25cd7 | 16 | void SetOneLegTriangleParam(Walk &walk, int legnum, float offset_x_m, float offset_y_m, float stride_m, float height_m, float buffer_height_m, |
shimizuta | 35:b4e1b8f25cd7 | 17 | float stridetime_s, float toptime_s, float buffer_time_s) |
shimizuta | 35:b4e1b8f25cd7 | 18 | { |
shimizuta | 35:b4e1b8f25cd7 | 19 | Orbit triangle(TRIANGLE); |
shimizuta | 35:b4e1b8f25cd7 | 20 | triangle.SetTriangleParam(offset_x_m, offset_y_m, stride_m, height_m, buffer_height_m, |
shimizuta | 35:b4e1b8f25cd7 | 21 | stridetime_s, toptime_s, buffer_time_s); |
shimizuta | 35:b4e1b8f25cd7 | 22 | walk.orbit[legnum].Copy(triangle); |
shimizuta | 35:b4e1b8f25cd7 | 23 | } |
shimizuta | 35:b4e1b8f25cd7 | 24 | void SetOneLegFreeLinesParam(Walk &walk, int legnum, LineParam lineparams[], int point_num) |
shimizuta | 35:b4e1b8f25cd7 | 25 | { |
shimizuta | 35:b4e1b8f25cd7 | 26 | Orbit freeline(FREELINES); |
shimizuta | 35:b4e1b8f25cd7 | 27 | freeline.SetFreeLinesParam(lineparams, point_num); |
shimizuta | 35:b4e1b8f25cd7 | 28 | walk.orbit[legnum].Copy(freeline); |
shimizuta | 35:b4e1b8f25cd7 | 29 | } |