serbo4soku

Dependencies:   mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM

MoveServoOfLeg/MoveServoOfLeg.h

Committer:
shimizuta
Date:
2 months ago
Revision:
9:905f93247688
Child:
10:7a340c52e270

File content as of revision 9:905f93247688:

#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