fieldpilot-urdf 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fieldpilot_urdf-0.1.0/.github/workflows/ci.yml +66 -0
- fieldpilot_urdf-0.1.0/.github/workflows/publish.yml +56 -0
- fieldpilot_urdf-0.1.0/.gitignore +21 -0
- fieldpilot_urdf-0.1.0/CHANGELOG.md +39 -0
- fieldpilot_urdf-0.1.0/LICENSE +661 -0
- fieldpilot_urdf-0.1.0/PKG-INFO +195 -0
- fieldpilot_urdf-0.1.0/README.md +157 -0
- fieldpilot_urdf-0.1.0/RELEASING.md +52 -0
- fieldpilot_urdf-0.1.0/SECURITY.md +75 -0
- fieldpilot_urdf-0.1.0/pyproject.toml +48 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/__init__.py +64 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/collisions.py +200 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/diagnose_core.py +162 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/diagnostics.py +192 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/faults.py +48 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/fk.py +94 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/graph.py +71 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/ik.py +172 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/importer.py +525 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/loader.py +187 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/models.py +149 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/repair.py +259 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/storage.py +165 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/trajectory.py +184 -0
- fieldpilot_urdf-0.1.0/src/fieldpilot_urdf/viz.py +163 -0
- fieldpilot_urdf-0.1.0/tests/test_diagnose_core.py +124 -0
- fieldpilot_urdf-0.1.0/tests/test_fault_diagnosis.py +73 -0
- fieldpilot_urdf-0.1.0/tests/test_fk.py +221 -0
- fieldpilot_urdf-0.1.0/tests/test_graph.py +108 -0
- fieldpilot_urdf-0.1.0/tests/test_ik.py +138 -0
- fieldpilot_urdf-0.1.0/tests/test_importer.py +524 -0
- fieldpilot_urdf-0.1.0/tests/test_mesh_collisions.py +231 -0
- fieldpilot_urdf-0.1.0/tests/test_repair.py +238 -0
- fieldpilot_urdf-0.1.0/tests/test_storage.py +123 -0
- fieldpilot_urdf-0.1.0/tests/test_trajectory.py +179 -0
- fieldpilot_urdf-0.1.0/tests/test_urdf.py +80 -0
- fieldpilot_urdf-0.1.0/tests/test_viz.py +116 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: test py${{ matrix.python-version }}${{ matrix.xacro && format(' · xacro {0}', matrix.xacro) || '' }}
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
17
|
+
# `xacro` is the most fragile dependency (importer.py patches its
|
|
18
|
+
# internals), so guard the lowest supported pin (the floor of the
|
|
19
|
+
# `xacro>=2.1` requirement) on one job in addition to latest.
|
|
20
|
+
include:
|
|
21
|
+
- python-version: "3.12"
|
|
22
|
+
xacro: "2.1.0"
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
|
|
30
|
+
# graphviz `dot` so the viz renderer tests actually run (they skip otherwise)
|
|
31
|
+
- name: Install graphviz
|
|
32
|
+
run: sudo apt-get update && sudo apt-get install -y graphviz
|
|
33
|
+
|
|
34
|
+
- name: Install package (with all extras + dev)
|
|
35
|
+
run: |
|
|
36
|
+
python -m pip install --upgrade pip
|
|
37
|
+
pip install -e ".[dev]"
|
|
38
|
+
|
|
39
|
+
- name: Pin xacro (matrix override)
|
|
40
|
+
if: ${{ matrix.xacro }}
|
|
41
|
+
run: pip install "xacro==${{ matrix.xacro }}"
|
|
42
|
+
|
|
43
|
+
- name: Show resolved versions
|
|
44
|
+
run: pip show xacro numpy scipy networkx pydantic | grep -E "^(Name|Version)"
|
|
45
|
+
|
|
46
|
+
- name: Run tests
|
|
47
|
+
run: pytest -q
|
|
48
|
+
|
|
49
|
+
build:
|
|
50
|
+
name: build & check distribution
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v4
|
|
54
|
+
- uses: actions/setup-python@v5
|
|
55
|
+
with:
|
|
56
|
+
python-version: "3.12"
|
|
57
|
+
- name: Build sdist + wheel
|
|
58
|
+
run: |
|
|
59
|
+
python -m pip install --upgrade pip build twine
|
|
60
|
+
python -m build
|
|
61
|
+
- name: Validate metadata
|
|
62
|
+
run: twine check dist/*
|
|
63
|
+
- uses: actions/upload-artifact@v4
|
|
64
|
+
with:
|
|
65
|
+
name: dist
|
|
66
|
+
path: dist/*
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishes on an annotated tag like `v0.1.0`. Uses PyPI Trusted Publishing
|
|
4
|
+
# (OIDC) — NO API token is stored in the repo. One-time setup on PyPI:
|
|
5
|
+
# add a pending publisher for project `fieldpilot-urdf`, owner `DuQuatre`,
|
|
6
|
+
# repo `fieldpilot-urdf`, workflow `publish.yml`, environment `pypi`.
|
|
7
|
+
# See RELEASING.md.
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
push:
|
|
11
|
+
tags: ["v*"]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
name: build & check
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
|
|
23
|
+
- name: Guard — tag must match project version
|
|
24
|
+
run: |
|
|
25
|
+
TAG="${GITHUB_REF_NAME#v}"
|
|
26
|
+
VER="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml","rb"))["project"]["version"])')"
|
|
27
|
+
echo "tag=$TAG pyproject=$VER"
|
|
28
|
+
if [ "$TAG" != "$VER" ]; then
|
|
29
|
+
echo "::error::tag v$TAG does not match pyproject version $VER"; exit 1
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
- name: Build sdist + wheel
|
|
33
|
+
run: |
|
|
34
|
+
python -m pip install --upgrade pip build twine
|
|
35
|
+
python -m build
|
|
36
|
+
- name: Validate metadata
|
|
37
|
+
run: twine check dist/*
|
|
38
|
+
- uses: actions/upload-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: dist
|
|
41
|
+
path: dist/*
|
|
42
|
+
|
|
43
|
+
publish:
|
|
44
|
+
name: publish to PyPI
|
|
45
|
+
needs: build
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
environment: pypi # configure this environment + the trusted publisher on PyPI
|
|
48
|
+
permissions:
|
|
49
|
+
id-token: write # OIDC — required for Trusted Publishing
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/download-artifact@v4
|
|
52
|
+
with:
|
|
53
|
+
name: dist
|
|
54
|
+
path: dist
|
|
55
|
+
- name: Publish
|
|
56
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
|
|
11
|
+
# Test / tooling
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.coverage
|
|
14
|
+
htmlcov/
|
|
15
|
+
.mypy_cache/
|
|
16
|
+
.ruff_cache/
|
|
17
|
+
|
|
18
|
+
# Editors / OS
|
|
19
|
+
.idea/
|
|
20
|
+
.vscode/
|
|
21
|
+
.DS_Store
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `fieldpilot-urdf` are documented here. Format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/), and the project aims to adhere
|
|
5
|
+
to [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [0.1.0] — 2026-06-13
|
|
8
|
+
|
|
9
|
+
First public release: the open robotics core of FieldPilot, extracted into a
|
|
10
|
+
standalone, pure-Python, pip-installable package (AGPL-3.0).
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Import** any ROS robot from an HTTPS URL — `import_urdf` expands `xacro`,
|
|
14
|
+
`$(find)`, and `<xacro:include>` in-process (no ROS, no build).
|
|
15
|
+
- **Parse** URDF ⇄ Pydantic model — `from_xml`, `from_file`, `to_xml`.
|
|
16
|
+
- **Kinematics** — forward kinematics (`forward_kinematics`) and numerical,
|
|
17
|
+
joint-limit-aware inverse kinematics (`solve_ik`).
|
|
18
|
+
- **Self-collision** — AABB + optional mesh-aware detection
|
|
19
|
+
(`detect_self_collisions`; meshes via the `[mesh]` extra).
|
|
20
|
+
- **Workspace / trajectory** sampling — `sample_workspace`, `check_trajectory`.
|
|
21
|
+
- **Validation** — 8 symbolic lint rules R001–R008 (`run_all`, `summary`).
|
|
22
|
+
- **Auto-repair** — deterministic fixes for the repairable rules (`repair`).
|
|
23
|
+
- **Symbolic fault diagnosis** — the pure two-tier hypothesis-and-test loop
|
|
24
|
+
(`diagnose`, `Symptom`, `Hypothesis`, `Verdict`).
|
|
25
|
+
- **Visualisation** — kinematic-tree and 3D-pose renderers
|
|
26
|
+
(`fieldpilot_urdf.viz`, via the `[viz]` extra).
|
|
27
|
+
- **Local registry** — file-based robot storage (`save_robot`, `load_robot`, …).
|
|
28
|
+
- Security: `import_urdf` ships SSRF defences (HTTPS-only, host allowlist,
|
|
29
|
+
5 MB cap, timeout, redirect re-validation) — see `SECURITY.md`.
|
|
30
|
+
- CI across Python 3.10–3.13 (plus an older-`xacro` guard); 144 tests.
|
|
31
|
+
|
|
32
|
+
### Notes
|
|
33
|
+
- Configuration env vars use the `FIELDPILOT_URDF_*` namespace; the legacy
|
|
34
|
+
`MECHDIAG_*` names are still read as a deprecated fallback.
|
|
35
|
+
- The LLM robot chat, the natural-language fault-diagnosis front-end, the
|
|
36
|
+
spare-parts BOM, and multi-tenant hosting are **not** part of this package —
|
|
37
|
+
they live in FieldPilot SaaS.
|
|
38
|
+
|
|
39
|
+
[0.1.0]: https://github.com/DuQuatre/fieldpilot-urdf/releases/tag/v0.1.0
|