1 // ************************************************************************** 2 // FILENAME:Robot.hpp 3 // AUTHOR: Kenji Suzuki 4 // DATE: 15 June 1993 5 // ************************************************************************** 6 7 #ifndef ROBOT_HPP 8 #define ROBOT_HPP 9 10 #include <Gait.hpp> 11 #include <Aquarobo.h> 12 #include <Leg.hpp> 13 #include <Body.hpp> 14 15 16 // ************************************************************************** 17 // class Robot 18 // ************************************************************************** 19 class GAIT_DLL_API Robot 20 { 21 public: 22 // Structure 23 Body body; // torso 24 Leg leg1; // leg1 25 Leg leg2; // leg2 26 Leg leg3; // leg3 27 Leg leg4; // leg4 28 Leg leg5; // leg5 29 Leg leg6; // leg6 30 MatrixMy H_matrix_B2W; // Homogeneous Transformation Matrix(BODY->WORLD) 31 MatrixMy H_matrix_W2B; // Homogeneous Transformation Matrix(WORLD->BODY) 32 MatrixMy R_matrix_B2W; // Rotation Transformation Matrix(BODY->WORLD) 33 MatrixMy R_matrix_W2B; // Rotation Transformation Matrix(WORLD->BODY) 34 35 // time elements 36 double current_time; // ccurrent time 37 double duty_factor; // duty factor is in Leg class. 38 // double kinematic_cycle_phase_variable; 39 double kinematic_phase_variable; 40 double kinematic_period; // same as locomotion period 41 double transfer_period; // transfer time[sec] 42 double support_period; // support time[sec] 43 44 // Constructor 45 Robot(); 46 Robot(double, double, double, double, double, double); 47 48 // Destrucor ~Robot()49 ~Robot() {} 50 51 // Operator 52 53 // Member Function 54 void Resize_CWV(); 55 void Find_Duty_Factor(); 56 void Find_Relative_Phase(); 57 58 void Support_Phase_Block(double sampling_time); 59 void Find_Kinematic_Period(); 60 61 void Transfer_Phase_Block(); 62 63 void Update_H_Matrix(); 64 void Update_Body_Posture_Block(double sampling_time); 65 void Update_CWV_Position_Block(); 66 void Update_Foot_Position_Block(double sampling_time); 67 void Inverse_Jacobian_Block(); 68 void Inverse_Kinematics_Block(); 69 void Update_Joint_Angle_Block(double sampling_time); 70 71 }; 72 73 74 #endif 75 76 // EOF 77