Skip to content

Commit 0513560

Browse files
committed
Implement parametric arm and bucket geometry solver
Added DESIGN_RULES.md to document geometric and parametric constraints. Refactored lifetrac_v25_params.scad to move bucket parameters up, implemented a target-driven arm geometry solver, and updated all related parameters for kinematic consistency. Modified arm_plate.scad and loader_arm_v2.scad to match new parametric logic and ensure physical alignment. Added test and helper scripts (test_solve_arm.py, temp.ipynb) and a compliance check notebook for future validation.
1 parent 3798799 commit 0513560

File tree

9 files changed

+798
-141
lines changed

9 files changed

+798
-141
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# LifeTrac v25 Design Rules & Invariants
2+
3+
This document establishes the non-negotiable geometric rules and parametric constraints for the LifeTrac v25 loader arm and bucket assembly. These rules ensure proper kinematics, ground engagement, and mechanical alignment.
4+
5+
## 1. Bucket Geometry & Ground Engagement
6+
* **Zero-Z Ground Contact**: When the loader arms are in the lowered position (`ARM_MIN_ANGLE`), the bottom plate of the bucket must be perfectly flush with the ground (Z = 0). `BUCKET_GROUND_CLEARANCE` should default to `0` or slightly negative (e.g., `-10` for digging visual), but never positive.
7+
* **1/5th Pivot Height Rule**: The center of the Bucket Pivot Pin must be located at exactly **20% (1/5th) of the total Bucket Height** measured from the bottom of the bucket.
8+
* Formula: `BUCKET_PIVOT_HEIGHT_FROM_BOTTOM = BUCKET_HEIGHT / 5`
9+
* **Lug Centering**: The mounting lugs on the bucket back plate must be centered vertically on this 1/5th height line.
10+
11+
## 2. Loader Arm Kinematics (Target-Driven)
12+
* **Target Priorty**: The arm geometry is solved *backwards* from the target. The Target Point `_T` (Bucket Pivot Pin Location) is the fixed constraint **when the arms are in the fully down position**.
13+
* `_T_z` = `BUCKET_HEIGHT / 5` (assuming flush ground contact).
14+
* **Dynamic Leg Sizing**: The Drop Leg Length (`L2` or `ARM_DROP_LEN`) is not a fixed input. It must be calculated by the solver to bridge the gap between the Main Arm geometry and the fixed Target Point `_T`.
15+
* *Constraint*: The arm leg must extend or shorten as needed to ensure the pivot pin hits the exact target Z-height.
16+
* **Crash Prevention**: The solver must prioritize the Target Point, but validity checks must ensure the arm tip material (steel extending below the pivot) does not crash into the ground before the bucket does.
17+
18+
## 3. Physical Component Alignment
19+
* **Matching Tip Radii**: The radius of the Loader Arm Tip (`boss_r` in `arm_plate.scad`) must visually and dimensionally match the Bucket Pivot Lugs to ensure a clean hinge assembly.
20+
* Constraint: `boss_r` == `PIVOT_HOLE_X_FROM_FRONT`.
21+
* **Hole Alignment**: The physical hole cut into the *Arm Plate* must strictly match the kinematic point `_T`.
22+
* **Z-Position**: Centered on the 6" tube profile (`PIVOT_HOLE_Z_FROM_BOTTOM = 76.2mm`).
23+
* **X-Position**: Defined by `PIVOT_HOLE_X_FROM_FRONT` (1.5" / 38.1mm).
24+
* **Hole Edge Margin**: For any structural plate with a hole (pivot holes, bolt holes), there must be at least a fixed value of **0.25 inch (6.35mm)** of material remaining between the edge of the hole and the edge of the plate.
25+
26+
## 4. Parametric Hierarchy
27+
* **Single Source of Truth**: All shared dimensions (Pin diameters, tube sizes, critical angles) must be defined in `lifetrac_v25_params.scad`.
28+
* **No Hardcoding**: Layout files (`lifetrac_v25.scad`) and Part files (`arm_plate.scad`) must never use raw numbers for geometric alignment. They must reference the global parameters.
29+
* **Solver Verification**: Any manual adjustment to the "Visual" arm model must be cross-checked against the "Kinematic" solver variables (`_L_drop_kinematic`, `_T_z`) to ensures the physical parts match the calculated motion path.
30+
31+
## 5. Bucket Curl & Range of Motion
32+
* **Maximum Curl Definition**: The bucket is considered curled to its maximum extent ("Full Curl") when the **Back Plate of the Bucket is parallel to the Drop Leg** (lower section) of the Loader Arm.
33+
* This physical hard stop prevents cylinder over-extension and defines the maximum material retention angle.
34+
* **Cylinder Retraction**: The mounting position of the crossbeam must be adjusted so that the bucket's hydraulic tilt cylinders are in the **fully retracted position** when the bucket is at the "Full Curl" position.
35+
* This ensures the mechanical limit (curl) aligns with the hydraulic limit (retraction).
36+
* **Dump Angle**: When the loader arms are in the fully raised position, the bucket must be capable of tilting downwards to at least **45 degrees below horizontal** (relative to ground level).
37+
* This ensures proper dumping of material at maximum height.
38+
* **Cylinder Stroke Usage**: The geometry should utilize at least **80-90% of the hydraulic cylinder stroke**.
39+
* Designing for 100% usage is risky (mechanical bottoming), but designing for < 50% usage is wasteful and reduces force efficiency.
40+
41+
## 6. Structural Standards & Clearance
42+
* **Wheel Clearance**: The Main Arm must maintain a minimum distance of **25mm (1 inch)** from the Front Wheels throughout the *entire* range of motion, not just at the closest approach point or rest position.
43+
* **Standard Material Sizes**: All major structural elements (arms, frame, lugs) must use dimensions available in standard steel stock (e.g., 3"x3", 2"x6", 4"x4" tubes).
44+
* *Rule*: No custom bent profiles or non-standard extrusions where standard rectangular/square tubing can be used.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"cells": [],
3+
"metadata": {
4+
"language_info": {
5+
"name": "python"
6+
}
7+
},
8+
"nbformat": 4,
9+
"nbformat_minor": 5
10+
}

LifeTrac-v25/mechanical_design/openscad/lifetrac_v25.scad

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,10 +2306,11 @@ module bucket_attachment() {
23062306
// Bucket rotates about this pivot
23072307
rotate([BUCKET_TILT_ANGLE, 0, 0]) {
23082308
// Pivot Lugs: U-Channel brackets bolted to bucket back plate
2309-
// Center the lower lug pair at 1/5 the bucket back plate height
2310-
_pivot_lug_z = (BUCKET_HEIGHT / 5) - BUCKET_PIVOT_HEIGHT_FROM_BOTTOM;
2309+
// The Pivot Lug Hole must be at (0,0,0) of this group (which is the Arm Tip/Pivot).
2310+
// The Bucket is shifted relative to this pivot.
2311+
23112312
for (x_offset = [-ARM_SPACING/2, ARM_SPACING/2]) {
2312-
translate([x_offset, 0, _pivot_lug_z])
2313+
translate([x_offset, 0, 0]) // Zero Z offset - Hole at Pivot
23132314
rotate([90, 0, 0]) // Flip front-to-back: base faces -Y (Bucket Back), legs face +Y
23142315
u_channel_lug_with_pin(TUBE_3X3_1_4, 100, BUCKET_PIVOT_PIN_DIA + 2);
23152316
}
@@ -2326,7 +2327,8 @@ module bucket_attachment() {
23262327
// Bucket
23272328
// Shift bucket Y to match lug height so back plate touches lugs
23282329
// Keep Z offset to maintain pivot height relative to bucket
2329-
translate([0, BUCKET_LUG_OFFSET, BUCKET_HEIGHT - BUCKET_PIVOT_HEIGHT_FROM_BOTTOM + BUCKET_BODY_Z_OFFSET])
2330+
// Added BUCKET_VISUAL_Z_OFFSET for fine tuning
2331+
translate([0, BUCKET_LUG_OFFSET, BUCKET_HEIGHT - BUCKET_PIVOT_HEIGHT_FROM_BOTTOM + BUCKET_BODY_Z_OFFSET + BUCKET_VISUAL_Z_OFFSET])
23302332
bucket();
23312333
}
23322334
}

0 commit comments

Comments
 (0)