test
Dependencies: mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM
Walk/orbit/orbit.h@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 | #ifndef INCLUDED_ORBIT_H |
shimizuta | 35:b4e1b8f25cd7 | 2 | #define INCLUDED_ORBIT_H |
shimizuta | 35:b4e1b8f25cd7 | 3 | #include "freeline.h" |
shimizuta | 35:b4e1b8f25cd7 | 4 | #include "triangle.h" |
shimizuta | 35:b4e1b8f25cd7 | 5 | enum OrbitPattern |
shimizuta | 35:b4e1b8f25cd7 | 6 | { |
shimizuta | 35:b4e1b8f25cd7 | 7 | TRIANGLE, |
shimizuta | 35:b4e1b8f25cd7 | 8 | FREELINES, |
shimizuta | 35:b4e1b8f25cd7 | 9 | }; |
shimizuta | 35:b4e1b8f25cd7 | 10 | //足の軌道を設定するクラスの皮。全ての軌道クラスを継承して一つにまとめる。patternで使い分ける |
shimizuta | 35:b4e1b8f25cd7 | 11 | //関数は継承元のものも使えるので、継承元のクラスも見てください |
shimizuta | 35:b4e1b8f25cd7 | 12 | class Orbit : public Triangle, public FreeLines |
shimizuta | 35:b4e1b8f25cd7 | 13 | { |
shimizuta | 35:b4e1b8f25cd7 | 14 | public: |
shimizuta | 35:b4e1b8f25cd7 | 15 | Orbit(){}; //ただ宣言する用 |
shimizuta | 35:b4e1b8f25cd7 | 16 | Orbit(OrbitPattern pattern); |
shimizuta | 35:b4e1b8f25cd7 | 17 | float GetOneWalkTime(); //足一周の時間 |
shimizuta | 35:b4e1b8f25cd7 | 18 | int GetOrbit(OneLeg &leg, float phasetime_s); //legに目標x,yを代入 |
shimizuta | 35:b4e1b8f25cd7 | 19 | void Copy(const Orbit &origin); |
shimizuta | 35:b4e1b8f25cd7 | 20 | |
shimizuta | 35:b4e1b8f25cd7 | 21 | private: |
shimizuta | 35:b4e1b8f25cd7 | 22 | OrbitPattern pattern_; |
shimizuta | 35:b4e1b8f25cd7 | 23 | }; |
shimizuta | 35:b4e1b8f25cd7 | 24 | #endif |