💯 Adds initial IK and servo functionality

This commit is contained in:
Rune Harlyk
2023-05-06 02:24:50 +02:00
parent baa14da9ff
commit 9705628f29
10 changed files with 659 additions and 9 deletions
+19
View File
@@ -0,0 +1,19 @@
#ifndef SPOT_IK_H
#define SPOT_IK_H
#include "esp_err.h"
typedef struct {
float x;
float y;
float z;
} point;
esp_err_t leg_IK(float* p, uint8_t leg_id, int16_t servo_angles[3]);
esp_err_t body_IK(float omega, float phi, float psi, float xm, float ym, float zm);
esp_err_t spot_IK(float omega, float phi, float psi, float xm, float ym, float zm, int16_t servoangles[4][3]);
void print_matrix(float * matrix, int n, int m, char* name) ;
void print_int_matrix(int16_t * matrix, int n, int m, char* name, uint8_t newlines);
#endif