Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
calculate.h
00001 #ifndef _CALCULATE_H 00002 #define _CALCULATE_H 00003 00004 #include "mbed.h" 00005 #include "data_pc.h" 00006 #include "data_board.h" 00007 #include "fuzzy.h" 00008 #include "timer.h" 00009 #include "used_leg_message.h" 00010 00011 00012 00013 #define CT (50) 00014 00015 00016 typedef struct{ 00017 float ankle_target_Kp; 00018 float ankle_target_Kd; 00019 float ankle_target_tff; 00020 00021 float knee_target_Kp; 00022 float knee_target_Kd; 00023 float knee_target_tff; 00024 }target_pid;/*模糊PID的s设定值*/ 00025 00026 00027 extern unsigned int send_enable; 00028 extern float pos_ankle; 00029 extern float pos_knee; 00030 extern target_pid tagertPID; 00031 00032 00033 00034 00035 float position_knee(float res); 00036 float position_ankle(float res); 00037 void calculate_ankle_fuzzy(float ankle_target_p, float knee_target_p); 00038 void calculate_fuzzy(float ankle_target_p, float knee_target_p); 00039 00040 void fuzzy_position_control_ankle(float ankle_real_p, float pos_ankle); 00041 void fuzzy_position_control_knee(float knee_real_p, float pos_knee); 00042 00043 void torque_control_ankle(); 00044 void torque_control_knee(); 00045 00046 00047 00048 void init_joint_angles(); 00049 00050 00051 00052 00053 #endif
Generated on Thu Jul 14 2022 02:10:39 by
