serbo4soku

Dependencies:   mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM

Revision:
9:905f93247688
Child:
10:7a340c52e270
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoveServoOfLeg/MoveServoOfLeg.h	Mon Feb 11 01:56:49 2019 +0000
@@ -0,0 +1,24 @@
+#ifndef INCLUDED_MOVESERVOOFLEG_H
+#define INCLUDED_MOVESERVOOFLEG_H
+#include "KondoServo.h"
+
+///歩く方向を指示する用
+class MoveServoOfLeg
+{
+    float rad_[2]; //足についてるサーボの目標角度。
+    float between_servo_half_m_;
+    float leglength1_;
+    float leglength2_;
+    KondoServo servo_;
+
+  public:
+MoveServoOfLeg(PinName pin_serial_tx, PinName pin_serial_rx,
+                               float between_servo_half_m,
+                               float leglength1, float leglength2);
+    void MoveServo(int servo_num);
+    void CalServoRad(float x_m, float y_m);
+    void SetRad(float rad, int servo_num);
+    float GetRad(int servo_num);
+};
+
+#endif
\ No newline at end of file