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.
Diff: LEG_MESSAGE/leg_message.h
- Revision:
- 5:6a95726e45b0
- Parent:
- 3:9ef9b4c66648
- Child:
- 8:95a914f962bd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/LEG_MESSAGE/leg_message.h Tue Oct 08 04:35:23 2019 +0000
@@ -0,0 +1,72 @@
+#ifndef _leg_message
+#define _leg_message
+
+
+// 头文件
+#include <stdint.h>
+
+
+// 定义结构体
+struct joint_control{ // 关节控制结构体
+ float p_des, v_des, kp, kd, t_ff; // 控制量为: p_des, v_des, kp, kd, t_ff
+ };
+
+struct ankle_control{ // 系统控制结构体
+ joint_control pf, df; // 控制成员: pf, df关节
+ };
+
+struct joint_state{ // 关节状态结构体
+ float p, v, t; // 状态成员: p\v\t
+ };
+
+struct ankle_state{ // 系统状态结构体
+ joint_state pf, df; // 状态成员: pf, df状态
+ };
+
+struct cal_data_t
+{
+ float q_pf;
+ float q_df;
+
+ float qd_pf;
+ float qd_df;
+
+ int32_t flag_pf;
+ int32_t flag_df;
+ //int32_t checksum;
+};
+
+struct cal_command_t
+{
+ float q_des_pf;
+ float q_des_df;
+
+ float qd_des_pf;
+ float qd_des_df;
+
+ float kp_pf;
+ float kp_df;
+
+ float kd_pf;
+ float kd_df;
+
+ float tau_pf_ff;
+ float tau_df_ff;
+
+ int32_t flag; // 进入电机模式标志位
+ //int32_t checksum;
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+#endif
\ No newline at end of file