Initial import: robot firmware + PlatformIO two-env scaffold
Robot-side firmware (Teensy 4.0) imported unchanged as extracted. platformio.ini defines [env:robot] (teensy40) and [env:remote] (teensy41); scripts/select_src_dir.py points each env at its own sketch folder so robot/ and remote/ stay Arduino-style sketches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
ad77b06c36
27 files changed
+1107
No files matched your search
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
struct JointAngles {
|
||||
float coxa_deg;
|
||||
float femur_deg;
|
||||
float tibia_deg;
|
||||
bool valid; // false if the target was unreachable or outside joint limits
|
||||
};
|
||||
|
||||
struct FootTarget {
|
||||
float x, y, z; // body-frame mm, relative to body center
|
||||
};
|
||||
|
||||
class Kinematics {
|
||||
public:
|
||||
// Solves leg i's joint angles for a body-frame foot target.
|
||||
static JointAngles solve(int leg_index, const FootTarget& target);
|
||||
|
||||
// The leg's resting/neutral foot target, in body frame.
|
||||
static FootTarget neutralStance(int leg_index);
|
||||
};
|
||||
Reference in new issue
Block a user