Skip to content

Commit 082bb02

Browse files
docs: formalize .lf standard and consolidate strategic technical roadmap
Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
1 parent a4cfcd8 commit 082bb02

5 files changed

Lines changed: 190 additions & 28 deletions

File tree

Justfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ fix:
6565
type-check:
6666
uv run mypy core/src/linkforge_core platforms/blender/linkforge
6767

68+
# --- Documentation ---
69+
70+
# Build documentation (Sphinx)
71+
docs:
72+
cd docs && make html
73+
@echo "📖 Documentation built at docs/build/html/index.html"
74+
6875
# --- Maintenance ---
6976

7077
# Clean build artifacts, caches, and OS junk

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
LinkForge brings the **"LLVM architecture" to Robotics**. It utilizes a universal, mathematical Intermediate Representation (IR) for physical robots—paving the way for the upcoming **`.lf` standard**.
1616

17-
By treating robot descriptions as *Source Code* rather than compiled *Executables*, LinkForge bridges the gap between CAD, Simulation, and AI training with zero data loss. Currently featuring a native **Blender integration**, it acts as a strict safety net to guarantee your robot is rigorous, physics-compliant, and simulation-ready.
17+
By treating robot descriptions as **"Source Code"** rather than compiled **"Executables"**, LinkForge bridges the gap between CAD, Simulation, and AI training with zero data loss. Currently featuring a native **Blender integration**, it acts as a strict safety net to guarantee your robot is rigorous, physics-compliant, and simulation-ready.
1818

1919
1. **Model & Import**: Build natively or ingest legacy URDF/XACRO files losslessly.
2020
2. **Lint & Validate**: Catch kinematic and physical errors before they hit your simulator.
@@ -165,19 +165,17 @@ For complete instructions on testing, linting, and building, see our [Contributi
165165

166166
### Phase 1: The Professional Bridge (Current)
167167
- [x] **v1.3.0**: Performance & Control (NumPy Acceleration, Depsgraph, & ROS2 Control).
168-
- [/] **v1.4.0**: Modular Assembly (Composer API, SRDF Generation).
168+
- [/] **v1.4.0**: Modular Synthesis (Composer API, Namespaced Merging, & SRDF Generation).
169169
- [ ] **v1.5.0**: Visual SRDF Editor in Blender & Semantic Assistant.
170170
- [ ] **v1.6.0**: LinkForge CLI & GitHub Actions for automated validation.
171171

172172
### Phase 2: Universal Interoperability (Upcoming)
173-
- [ ] **v1.7.0**: Official launch of the **`.lf` File Standard**.
174-
- [ ] **AI Update**: Native MuJoCo (MJCF) and Gazebo (SDF) exporters.
175-
- [ ] **IDE Integration**: VS Code Extension with real-time linting & 3D preview.
176-
177-
### Phase 3: The Intelligence Ecosystem (Future)
178-
- [ ] **CAD Expansion**: Connectors for FreeCAD and OnShape.
179-
- [ ] **LinkForge Package Manager (LPM)**: Decentralized cloud registry (`lf://`).
180-
- [ ] **Auto-Rigging**: Graph Neural Networks (GNNs) for automated joint placement.
173+
- [ ] **v2.0.0**: Official launch of the **`.lf` File Standard**.
174+
- [ ] **v2.1.0**: **AI Engine Update** (Native MuJoCo/MJCF exporter).
175+
- [ ] **v2.2.0**: **Simulation Expansion** (Native Gazebo/SDF exporter).
176+
177+
> [!TIP]
178+
> For a deep dive into our long-term technical strategy and the "Digital Twin" philosophy, see **[VISION.md](VISION.md)**.
181179
182180
## 🤝 Contributing
183181

VISION.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,28 @@ To build the **LLVM for Robotics**. We are eliminating the fundamental gap betwe
1515

1616
## 🌉 The Universal Robotics Bridge
1717

18-
There is a fundamental "impedance mismatch" in the modern robotics workflow. LinkForge exists to eliminate it.
18+
There is a fundamental "impedance mismatch" in the modern robotics workflow. LinkForge exists to eliminate it by redefining how we treat robot descriptions.
1919

2020
### The Problem: "Executables" vs. "Source Code"
2121
Currently, the robotics ecosystem treats formats like URDF, SDF, and MJCF as the source of truth. However, these are actually **"Executables"**—lossy, environment-specific snapshots compiled from opaque CAD tools.
22-
When a design is exported, critical metadata (author intent, precise materials, motor curves) is lost. Furthermore, this is a one-way street: true "Round-Trip Engineering" (editing a simulation model and syncing it back to CAD) is nearly impossible.
22+
23+
When you export a robot to URDF, you are "compiling" it. If you manually fix a joint limit in the XML, you cannot easily "decompile" that change back into your CAD model. Your design intent is lost in a one-way, destructive pipeline.
2324

2425
### The Solution: The `.lf` Standard
25-
LinkForge introduces the `.lf` file format—the **"Source Code"** for robotics. It acts as the high-fidelity translator ensuring your design intent is mathematically preserved across the entire development lifecycle:
26+
LinkForge introduces the `.lf` file format—the **"Source Code"** for robotics.
27+
* **The Git for Robotics**: Just as Git tracks code changes, LinkForge tracks the physical intent of your robot.
28+
* **Unified Truth**: The `.lf` format acts as a high-fidelity translator ensuring your design intent is mathematically preserved across the entire development lifecycle:
2629

27-
**Design Systems** (Blender, FreeCAD, OnShape) ➜ **LinkForge Core (`.lf`)****Simulation & Production** (ROS 2, MuJoCo, Isaac Sim, Real Hardware)
30+
**Design Systems** (Blender, FreeCAD) ➜ **LinkForge Core (`.lf`)****Simulation & Production** (ROS 2, MuJoCo, Isaac Sim)
2831

2932
---
3033

3134
## 🔭 The "Digital Twin" North Star
3235

3336
We believe a simulator should never be "close enough." It should be identical. Our North Star is the perfect **Digital Twin**:
34-
* **True Round-Trip Engineering**: Import legacy models, validate them, edit them visually, and deploy them anywhere without data destruction.
35-
* **Automated Linting**: Catch mechanical conflicts and kinematic errors *during* the design phase—reducing simulation failures and hardware rework.
36-
* **Numerical Integrity**: Every mass calculation and inertia tensor is scientifically grounded, guaranteed by a core that enforces double-precision physics over approximations.
37+
* **True Round-Trip Engineering**: Import legacy models, validate them, edit them visually, and redeploy them anywhere without data destruction.
38+
* **Physics as Truth**: Every mass calculation and inertia tensor is scientifically grounded. If the physics are wrong, the Linter catches it *during* the design phase—long before it hits hardware.
39+
* **Numerical Integrity**: We enforce double-precision physics over approximations, ensuring that your robot behaves the same way in MuJoCo as it does in the real world.
3740

3841
---
3942

@@ -45,36 +48,35 @@ Why LinkForge is the infrastructure for the next generation of robotics:
4548
| :--- | :--- | :--- |
4649
| **Architecture** | Monolithic / Tied to one CAD tool | **Hexagonal / Multi-Host & Multi-Target** |
4750
| **Format** | XML-based, Lossy, Fragmented | **JSON/YAML `.lf` Standard (Metadata-Rich)** |
48-
| **Validation** | Post-Export (Fail in Sim) | **Automated Linting (Fail in Editor via LSP)** |
51+
| **Validation** | Post-Export (Fail in Sim) | **Automated Linting (Fail in Editor)** |
4952
| **Physics** | "Close Enough" Mesh Export | **Scientific Inertia & Mass Sanity** |
5053
| **Asset Loading** | Fragile Local File Paths | **Cloud-Native `lf://` URI Resolution** |
5154

5255
---
5356

5457
## 🏗️ Technical Strategy: The Hexagonal Core
5558

56-
LinkForge is engineered for the future. By utilizing a **Hexagonal Architecture (Ports & Adapters)**, we remain framework-independent:
57-
* **Decoupled Intelligence**: Our "Robotics Brain" (`linkforge_core`) is completely isolated from specific UI hosts or simulation engines.
58-
* **Model Once, Deploy Anywhere**: Write your robot once in `.lf`, and swappable adapters will generate the exact MJCF, URDF, or SDF needed for your specific runtime.
59-
* **Scalable Adaptation**: As new tools and engines emerge, LinkForge is ready to bridge them without rewriting the fundamental physics core.
59+
LinkForge is the **"LLVM for Robotics."** By utilizing a **Hexagonal Architecture**, we remain framework-independent:
60+
* **Decoupled Intelligence**: Our "Robotics Brain" (`linkforge_core`) is isolated from specific UI hosts or simulation engines.
61+
* **Model Once, Deploy Anywhere**: Write your robot once in `.lf`, and swappable adapters generate the exact MJCF, URDF, or SDF needed for your specific runtime.
6062

6163
---
6264

6365
## 🚀 Future Horizons
6466

6567
We are building the infrastructure for the next generation of autonomy:
66-
* **🛡️ Kinematic Intelligence**: Built-in solvers to validate workspace reachability and mechanical interference inside the visual editor.
67-
* **🧠 Intelligence-Driven Rigging**: Graph Neural Networks (GNNs) that leverage geometric analysis to automate joint and sensor placement based on mesh topology.
68-
* **📦 The LinkForge Package Manager (LPM)**: A global, decentralized registry for verified robot parts.
69-
* **🌊 High-Fidelity Noise Injection**: Modeling real-world sensor imperfections (drift, jitter, bias) directly in the IR to close the Sim-to-Real gap.
68+
* **🛡️ Kinematic Intelligence**: Built-in solvers to validate workspace reachability inside the visual editor.
69+
* **🧠 Intelligence-Driven Rigging**: Graph Neural Networks (GNNs) that automate joint placement based on mesh topology.
70+
* **📦 The LinkForge Package Manager (LPM)**: A decentralized registry for verified robot components.
71+
* **🌊 High-Fidelity Noise Injection**: Modeling real-world sensor imperfections directly in the IR to close the Sim-to-Real gap.
7072

7173
---
7274

7375
## 🗺️ Vision 2030: The Universal Connector
7476

75-
By 2030, the "monolithic robot" will be a thing of the past. We believe the robotics industry will evolve into a modular ecosystem where specialized companies build world-class components—legs, torsos, manipulators—that just work together.
77+
By 2030, the "monolithic robot" will be a thing of the past. We believe the robotics industry will evolve into a modular ecosystem where specialized components—legs, torsos, manipulators—just work together.
7678

77-
**LinkForge is the "USB Port" for this future.** By providing the universal Intermediate Representation (IR), we enable a global supply chain where any "LinkForge Certified" part can be plugged into any assembly with zero friction. We are building the economic infrastructure for the physical world.
79+
**LinkForge is the "USB Port" for this future.** By providing a universal Intermediate Representation (IR), we enable a global ecosystem where any **standard-compliant** part can be integrated into any assembly with zero friction. We are building the **foundational infrastructure** for the physical world.
7880

7981
---
8082

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# LinkForge: The LLVM for Robotics
2+
3+
One of the core architectural inspirations for LinkForge is the **LLVM Compiler Infrastructure**. This document explains why we use this analogy and how it maps to the physical world of robotics.
4+
5+
---
6+
7+
## 1. The Analogy: Software vs. Hardware
8+
9+
In software development, compilers like Clang/LLVM solved the "M-by-N" problem (M languages, N hardware architectures). Instead of writing a unique compiler for every pair, they created an **Intermediate Representation (IR)**.
10+
11+
LinkForge does the same for Robotics:
12+
13+
| Concept | LLVM (Software) | LinkForge (Robotics) |
14+
| :--- | :--- | :--- |
15+
| **Frontend** | C++, Rust, Swift (Source) | Blender, FreeCAD, URDF (Design) |
16+
| **Middle-End** | **LLVM IR** (Optimization) | **LinkForge IR (`.lf`)** (Validation) |
17+
| **Backend** | x86, ARM, NVPTX (Binary) | MuJoCo, ROS 2, Isaac Sim (Simulation) |
18+
19+
---
20+
21+
## 2. Why "Source Code" Matters
22+
23+
In traditional robotics, a URDF is an **Executable**. It is a lossy, "compiled" snapshot of a design. If you need to change a motor's mass, you edit the XML directly, but that change never "decompiles" back into your original CAD source.
24+
25+
By treating the `.lf` IR as **Source Code**, LinkForge enables:
26+
1. **Bidirectional Sync**: Changes in the "Executable" (Simulator) can be merged back into the "Source" (CAD).
27+
2. **Linting**: Just as a compiler catches syntax errors, LinkForge catches **Kinematic and Physical Errors** (e.g., disconnected chains, negative inertia) before they reach the simulator.
28+
3. **Optimization**: The LinkForge "Middle-End" can simplify complex meshes or optimize mass distributions automatically while preserving the IR's integrity.
29+
30+
---
31+
32+
## 3. Intermediate Optimization
33+
34+
Just as LLVM has "Optimization Passes," the LinkForge Middle-End performs intelligent operations on the robot IR to ensure it is simulation-ready.
35+
36+
### Current "Passes" [Live]
37+
* **Physical Integrity Pass**: Validates inertia tensors against the triangle inequality to prevent "unphysical" simulation behavior.
38+
* **Namespacing Pass**: Automatically prefixes link and joint names during assembly to prevent kinematic collisions.
39+
* **Semantic Synthesis**: Combines disparate sub-robots into a single, unified kinematic graph with verified root links.
40+
41+
---
42+
43+
## 4. The Hexagonal Advantage
44+
45+
LinkForge’s **Hexagonal Architecture** mirrors LLVM’s modularity.
46+
* **Decoupled Intelligence**: The core logic (`linkforge_core`) is isolated from specific UI hosts or simulation engines.
47+
* **Swappable Adapters**: To support a new simulator (like a new backend in LLVM), we only need to write a single adapter that translates LinkForge IR to the target format.
48+
49+
---
50+
51+
## 5. Summary
52+
53+
LinkForge isn't just an exporter; it is a **Transformation Engine**. We are building the infrastructure that allows roboticists to stop "hand-crafting binaries" and start "engineering with source code."
54+
55+
---
56+
57+
> [!IMPORTANT]
58+
> **LinkForge** is built for the era of Embodied AI, where high-fidelity simulation is the only way to scale.

docs/specification/LF_STANDARD.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# The `.lf` Standard: Robotics Intermediate Representation (IR)
2+
3+
**Version**: 1.1
4+
**Status**: Specification Draft
5+
**Target Runtimes**: ROS 2, MuJoCo, Gazebo, Isaac Sim
6+
7+
---
8+
9+
## 1. Overview
10+
The `.lf` (LinkForge) format is the "Source Code" for robotics. It is a high-fidelity, metadata-rich Intermediate Representation (IR) designed to bridge the gap between CAD tools and simulation engines without data loss.
11+
12+
### Design Principles
13+
1. **Physics is Truth**: Every inertial property must be physically plausible (validated via the triangle inequality).
14+
2. **Lossless Round-Trips**: All data required for simulation must be syncable back to the visual modeling environment.
15+
3. **Modular Assembly**: Support for referencing external components via `lf://` URIs.
16+
17+
---
18+
19+
## 2. File Structure
20+
The `.lf` standard uses **JSON** or **YAML** as its primary exchange format.
21+
22+
### 2.1 Top-Level Schema
23+
```json
24+
{
25+
"format_version": "1.1",
26+
"units": {
27+
"length": "meters",
28+
"mass": "kg",
29+
"angle": "radians",
30+
"time": "seconds"
31+
},
32+
"metadata": {
33+
"name": "string",
34+
"author": "string",
35+
"license": "string",
36+
"version": "semver"
37+
},
38+
"kinematics": "KinematicsObject",
39+
"perception": "PerceptionObject",
40+
"control": "ControlObject",
41+
"sim_specific": "SimulationObject"
42+
}
43+
```
44+
45+
---
46+
47+
## 3. Core Components
48+
49+
### 3.1 Kinematics (Links & Joints)
50+
Links represent rigid bodies, and Joints represent the kinematic constraints between them.
51+
52+
#### Inertial Properties
53+
LinkForge enforces scientific inertia tensors.
54+
```json
55+
"inertial": {
56+
"mass": 1.25,
57+
"origin": [0, 0, 0, 1, 0, 0, 0], // [x, y, z, qw, qx, qy, qz]
58+
"inertia": {
59+
"ixx": 0.001, "ixy": 0.0, "ixz": 0.0,
60+
"iyy": 0.001, "iyz": 0.0,
61+
"izz": 0.001
62+
}
63+
}
64+
```
65+
66+
### 3.2 Resource Resolution (`lf://`)
67+
Assets (meshes, materials) should be referenced using cloud-resolvable URIs.
68+
* `lf://local/parts/wheel.glb`: Resolve from the local project workspace.
69+
* `lf://registry/sensors/lidar_v3.lf`: Resolve from a global or private registry.
70+
71+
### 3.3 Actuator Curves (AI-Ready)
72+
To support high-fidelity Reinforcement Learning, `.lf` supports torque/effort curves rather than just static limits.
73+
```json
74+
"actuator": {
75+
"type": "dc_motor",
76+
"torque_curve": [
77+
{"rpm": 0, "torque": 5.0},
78+
{"rpm": 1000, "torque": 4.5}
79+
]
80+
}
81+
```
82+
83+
---
84+
85+
## 4. Namespacing & Modular Assembly
86+
When merging robots (e.g., attaching an arm to a torso), LinkForge uses **Prefix Namespacing** to avoid collisions.
87+
* Sub-robot `arm` link `hand` becomes `arm_hand` in the final IR.
88+
89+
---
90+
91+
## 5. Future: Binary IR
92+
For high-performance loading in large-scale simulation environments (e.g., thousands of robots in Isaac Sim), LinkForge will introduce a **Binary IR** based on **Protocol Buffers (protobuf)**. This will serve as the "Object File" (`.lfo`) to the `.lf` "Source Code."
93+
94+
---
95+
96+
> [!TIP]
97+
> For implementation details, see the `linkforge_core.models` Python module in the source code.

0 commit comments

Comments
 (0)