test
Dependencies: mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM
Walk/Walk.h@11:e81425872740, 2019-02-11 (annotated)
- Committer:
- shimizuta
- Date:
- Mon Feb 11 12:56:00 2019 +0000
- Revision:
- 11:e81425872740
- Child:
- 13:e7ecdb20665a
ver2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shimizuta | 11:e81425872740 | 1 | #ifndef INCLUDED_WALK_H |
shimizuta | 11:e81425872740 | 2 | #define INCLUDED_WALK_H |
shimizuta | 11:e81425872740 | 3 | #include "OneLeg.h" |
shimizuta | 11:e81425872740 | 4 | |
shimizuta | 11:e81425872740 | 5 | //足の軌道を設定するクラス。 |
shimizuta | 11:e81425872740 | 6 | class Orbit |
shimizuta | 11:e81425872740 | 7 | { |
shimizuta | 11:e81425872740 | 8 | float stridetime_s_; |
shimizuta | 11:e81425872740 | 9 | float risetime_s_; |
shimizuta | 11:e81425872740 | 10 | float stride_m_; |
shimizuta | 11:e81425872740 | 11 | float height_m_; //足の上げ幅 |
shimizuta | 11:e81425872740 | 12 | float ground_m_; //着地するときの高さ |
shimizuta | 11:e81425872740 | 13 | OneLeg StrideLine_(OneLeg leg, float phasetime_s); |
shimizuta | 11:e81425872740 | 14 | OneLeg RiseEllipse_(OneLeg leg, float phasetime_s); |
shimizuta | 11:e81425872740 | 15 | OneLeg OrbitEllipse_(OneLeg leg, float phasetime_s); |
shimizuta | 11:e81425872740 | 16 | |
shimizuta | 11:e81425872740 | 17 | public: |
shimizuta | 11:e81425872740 | 18 | Orbit(){}; |
shimizuta | 11:e81425872740 | 19 | Orbit(float stridetime_s, float risetime_s, float stride_m, float height_m, float ground_m); |
shimizuta | 11:e81425872740 | 20 | OneLeg GetOrbit(OneLeg leg, float phasetime_s); |
shimizuta | 11:e81425872740 | 21 | float GetOneWalkTime(); //足一周の時間 |
shimizuta | 11:e81425872740 | 22 | }; |
shimizuta | 11:e81425872740 | 23 | |
shimizuta | 11:e81425872740 | 24 | //4足の足の動かし方を保存するクラス |
shimizuta | 11:e81425872740 | 25 | class Walk |
shimizuta | 11:e81425872740 | 26 | { |
shimizuta | 11:e81425872740 | 27 | float phasetime_s_; |
shimizuta | 11:e81425872740 | 28 | float offsettime_s_[4]; |
shimizuta | 11:e81425872740 | 29 | |
shimizuta | 11:e81425872740 | 30 | public: |
shimizuta | 11:e81425872740 | 31 | Walk(Orbit orbit[4], float offsettime_s[4], float cycletime_s); |
shimizuta | 11:e81425872740 | 32 | float cycletime_s_; |
shimizuta | 11:e81425872740 | 33 | Orbit orbit_[4]; |
shimizuta | 11:e81425872740 | 34 | void Cal4LegsPosi(OneLeg (&leg)[4]); |
shimizuta | 11:e81425872740 | 35 | }; |
shimizuta | 11:e81425872740 | 36 | #endif |