test
Dependencies: mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM
Walk/orbit/freeline/freeline.h@41:38d79b6513c0, 2019-03-05 (annotated)
- Committer:
- yuto17320508
- Date:
- Tue Mar 05 01:45:03 2019 +0000
- Revision:
- 41:38d79b6513c0
- Parent:
- 35:b4e1b8f25cd7
- Child:
- 42:982064594ba6
devide PointToPoint and LineKeep;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shimizuta | 35:b4e1b8f25cd7 | 1 | #ifndef INCLUDED_FREELINE_H |
shimizuta | 35:b4e1b8f25cd7 | 2 | #define INCLUDED_FREELINE_H |
shimizuta | 35:b4e1b8f25cd7 | 3 | #include "OneLeg.h" |
yuto17320508 | 41:38d79b6513c0 | 4 | const int LineKeep = 0; |
yuto17320508 | 41:38d79b6513c0 | 5 | const int PointToPoint = 1; |
shimizuta | 35:b4e1b8f25cd7 | 6 | struct LineParam |
shimizuta | 35:b4e1b8f25cd7 | 7 | { |
yuto17320508 | 41:38d79b6513c0 | 8 | int line_state;//直線を維持するか、点の間を最短で経過するか |
shimizuta | 35:b4e1b8f25cd7 | 9 | float time_s; //x_m,y_mにいる時間 |
shimizuta | 35:b4e1b8f25cd7 | 10 | float x_m; |
shimizuta | 35:b4e1b8f25cd7 | 11 | float y_m; |
shimizuta | 35:b4e1b8f25cd7 | 12 | }; |
shimizuta | 35:b4e1b8f25cd7 | 13 | //複数の直線で軌道構成.理論もへったくれもなく自由に線を書く |
shimizuta | 35:b4e1b8f25cd7 | 14 | class FreeLines |
shimizuta | 35:b4e1b8f25cd7 | 15 | { |
shimizuta | 35:b4e1b8f25cd7 | 16 | public: |
shimizuta | 35:b4e1b8f25cd7 | 17 | void SetFreeLinesParam(LineParam lineparams[], int point_num); //任意の直線の軌道を設定 |
shimizuta | 35:b4e1b8f25cd7 | 18 | int GetOrbit(OneLeg &leg, float phasetime_s); |
shimizuta | 35:b4e1b8f25cd7 | 19 | float GetOneWalkTime(); //足一周の時間 |
shimizuta | 35:b4e1b8f25cd7 | 20 | void Copy(const FreeLines & origin); |
shimizuta | 35:b4e1b8f25cd7 | 21 | LineParam lineparams_[20]; //pointの数は多めにとっている。 |
shimizuta | 35:b4e1b8f25cd7 | 22 | int point_num_; //pointの数 |
shimizuta | 35:b4e1b8f25cd7 | 23 | }; |
shimizuta | 35:b4e1b8f25cd7 | 24 | |
shimizuta | 35:b4e1b8f25cd7 | 25 | #endif |