2026: OpenSCAD robot and remote, physical joint limits, model in Unity
hardware/openscad/ rebuilds the broken Fusion models as OpenSCAD: body (top/bottom plate, standoffs, battery bay, switch), legs (coxa bracket, femur link, tibia, horn adapters, TPU socks, servo cables), the whole robot, and the remote (shell, lid, Nextion 3.5", JH-D400X-R4 sticks, 18650 UPS board, IMU, Teensy 4.0, USB-C breakout). Every part was checked by slicing against the original STEP solids; the original's bugs are fixed and listed in PLANNING.md. The robot now uses a hexagon leg layout (corner legs 60 deg round from the mid legs; the corner coxa brackets need turning on their splines). Physical limits from a collision sweep of the model are in Config.h: per-leg coxa limits and LEG_CLEARANCE_MM 56 (a leg is 55.2 mm wide at the joints); the sim API exports them (version 7). sim_smoke passes. Unity loads the model (export_unity.py -> Resources/OpenScadModel, OpenScadModel.cs builds a new rig in place of the old scene's robot). The PCB model's mounting holes now use the exact EasyEDA grid. README shows renders of both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b1c94e4149
commit
91b5b99fd5
42 files changed
+1560
-20
No files matched your search
+18
-2
@@ -168,6 +168,11 @@ Remote stick-frame convention: logical X + = right, Y + = forward, twist +
|
||||
- `HexapodSimBootstrap` auto-adds `HexapodSimulation` in any scene and
|
||||
disables the old scripts (`Walk`, `RotationControl`, `Leg`,
|
||||
`HandleHoystick`). Those are kept for reference only.
|
||||
- `OpenScadModel` replaces the old scene's robot with the OpenSCAD model
|
||||
(meshes from `hardware/openscad/export_unity.py` in
|
||||
`Resources/OpenScadModel/`): it builds a new rig with the same names at
|
||||
the Config.h geometry, whose rest pose (coxa 0, femur 0, tibia -90) is
|
||||
the zero rotation. `HexapodSimulation.useOpenScadModel` turns it off.
|
||||
- `HexapodSimNative` loads a temp copy of the DLL via
|
||||
LoadLibrary/GetProcAddress, so there's no file lock and each Play is a
|
||||
fresh power-on.
|
||||
@@ -212,14 +217,25 @@ Robot (`robot/README.md` has detail):
|
||||
- `Config.h` geometry now comes from the Unity model (owner's request),
|
||||
1 unit = 10 mm:
|
||||
- legs at X ±100 / 0, Y ±50 / ±65 mm,
|
||||
- mount angles ±90° (coxa straight sideways at servo center),
|
||||
- mount angles ±30° / ±90° / ±150° (hexagon layout, owner's request: mid
|
||||
legs sideways, corner legs 60° further round; coxa direction at servo
|
||||
centre — the corner brackets sit 60° round on their splines),
|
||||
- coxa/femur/tibia 55/100/150 mm,
|
||||
- stance radius 75 (so 130 mm out from the coxa pivot), height 150 mm.
|
||||
|
||||
The old scene's `Leg.translateX` = ±5 was only the old code's rotation
|
||||
pivot; the rig hips are at x ±10. Still to confirm on the real chassis:
|
||||
joint limits, servo pins, µs/deg calibration, `MAX_JOINT_DEG_S` (in
|
||||
servo pins, µs/deg calibration, `MAX_JOINT_DEG_S` (in
|
||||
robot.ino), the Limits envelope, InputMapper maxima.
|
||||
- **Geometry and limits confirmed against the CAD (owner's request):** the
|
||||
OpenSCAD rebuild of the real chassis (`hardware/openscad/`, see its
|
||||
`PLANNING.md`) has exactly these mounts and 55/100/150 mm links (tibia to
|
||||
the centre of a 10 mm foot ball; femur/knee axes in the coxa pivot plane,
|
||||
13.5 mm above the bottom plate). Its collision sweep gave the joint
|
||||
limits now in `Config.h`: coxa limits are **per leg**
|
||||
(`COXA_MIN_DEG[i]`/`COXA_MAX_DEG[i]`; all ±60 in the hexagon layout, but in
|
||||
the old sideways layout a corner leg only swung ~36° towards its mid leg),
|
||||
and `LEG_CLEARANCE_MM` is 56 (a leg is 55.2 mm wide at the joints). The sim API exports the per-leg coxa limits (version 7).
|
||||
- **Fixed (owner-approved):** the `Kinematics.cpp` femur elevation sign
|
||||
(`atan2(local_z, horiz)`; it used to solve for a foot above the hip, so
|
||||
every solution was invalid). Stance pose is now femur −1.2°, tibia
|
||||
|
||||
Reference in new issue
Block a user