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,15 @@
|
||||
#pragma once
|
||||
#include "Kinematics.h"
|
||||
|
||||
class Limits {
|
||||
public:
|
||||
// Clamps a foot target into a conservative safe envelope around the leg's neutral stance.
|
||||
static FootTarget clampWorkspace(int leg_index, const FootTarget& target);
|
||||
|
||||
// Rate-limits a joint angle change to the servo's real max speed.
|
||||
static float clampJointRate(float current_deg, float target_deg, float max_deg_per_sec, float dt);
|
||||
|
||||
// Coarse safety check: are enough legs grounded right now to be stable.
|
||||
// A real support-polygon/center-of-mass check is a good later upgrade.
|
||||
static bool stancePolygonOk(const bool in_stance[6]);
|
||||
};
|
||||
Reference in new issue
Block a user