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.h
- Revision:
- 0:76c761d3caf1
- Child:
- 5:f1703165ca7e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/leg_message.h Sat Mar 20 18:38:51 2021 +0000
@@ -0,0 +1,60 @@
+#ifndef _leg_message
+#define _leg_message
+
+#include <stdint.h>
+
+// 88 bytes
+// 44 16-bit words
+struct spi_data_t
+{
+ float q_1s[3];
+ float q_2s[3];
+ float q_3s[3];
+ float qd_1s[3];
+ float qd_2s[3];
+ float qd_3s[3];
+ int32_t flags[3];
+ int32_t checksum;
+};
+
+// 196 bytes
+// 98 16-bit words
+struct spi_command_t
+{
+ float q_des_1s[3];
+ float q_des_2s[3];
+ float q_des_3s[3];
+ float qd_des_1s[3];
+ float qd_des_2s[3];
+ float qd_des_3s[3];
+ float kp_1s[3];
+ float kp_2s[3];
+ float kp_3s[3];
+ float kd_1s[3];
+ float kd_2s[3];
+ float kd_3s[3];
+ float tau_1s_ff[3];
+ float tau_2s_ff[3];
+ float tau_3s_ff[3];
+ int32_t flags[3];
+ int32_t checksum;
+};
+
+
+
+struct joint_control{
+ float p_des, v_des, kp, kd, t_ff;
+ };
+
+struct joint_state{
+ float p, v, t;
+ };
+
+struct grouped_act_state{
+ joint_state a, h, k;
+ };
+struct grouped_act_control{
+ joint_control a, h, k;
+ }
+ ;
+#endif
\ No newline at end of file