test
Dependencies: mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM
OneLeg/OneLeg.h@27:79b4b932a6dd, 2019-02-27 (annotated)
- Committer:
- shimizuta
- Date:
- Wed Feb 27 01:24:00 2019 +0000
- Revision:
- 27:79b4b932a6dd
- Parent:
- 19:1adc7302cfd9
debug was ok. ROS is not debuged
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shimizuta | 11:e81425872740 | 1 | #ifndef INCLUDED_ONELEG_H |
shimizuta | 11:e81425872740 | 2 | #define INCLUDED_ONELEG_H |
shimizuta | 11:e81425872740 | 3 | ///足先の座標を保存するクラス。x,yやサーボの角度の保存を行う。他の足を考慮した処理は別のクラスに任せる。 |
shimizuta | 11:e81425872740 | 4 | class OneLeg |
shimizuta | 11:e81425872740 | 5 | { |
shimizuta | 27:79b4b932a6dd | 6 | float rad_[2]; //足についてるサーボの目標角度。 |
shimizuta | 27:79b4b932a6dd | 7 | float x_m_; |
shimizuta | 27:79b4b932a6dd | 8 | float y_m_; |
shimizuta | 27:79b4b932a6dd | 9 | float between_servo_half_m_; |
shimizuta | 27:79b4b932a6dd | 10 | float leglength1_[2]; |
shimizuta | 27:79b4b932a6dd | 11 | float leglength2_[2]; |
shimizuta | 27:79b4b932a6dd | 12 | void SetRad(float rad, int servo_num); |
shimizuta | 11:e81425872740 | 13 | |
shimizuta | 27:79b4b932a6dd | 14 | public: |
shimizuta | 27:79b4b932a6dd | 15 | OneLeg(){}; |
shimizuta | 27:79b4b932a6dd | 16 | OneLeg(float between_servo_half_m, float leglength1[2], float leglength2[2]); |
shimizuta | 27:79b4b932a6dd | 17 | void MoveServo(int servo_num); |
shimizuta | 27:79b4b932a6dd | 18 | float GetRad(int servo_num); |
shimizuta | 27:79b4b932a6dd | 19 | float GetX_m(); |
shimizuta | 27:79b4b932a6dd | 20 | float GetY_m(); |
shimizuta | 27:79b4b932a6dd | 21 | int SetXY_m(float x_m, float y_m); |
shimizuta | 11:e81425872740 | 22 | }; |
shimizuta | 11:e81425872740 | 23 | |
shimizuta | 11:e81425872740 | 24 | #endif |