trodestrack 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.
Files changed (151) hide show
  1. trodestrack-0.1.0/.github/workflows/ci.yml +94 -0
  2. trodestrack-0.1.0/.github/workflows/docs.yml +65 -0
  3. trodestrack-0.1.0/.github/workflows/tests.yml +72 -0
  4. trodestrack-0.1.0/.gitignore +65 -0
  5. trodestrack-0.1.0/.pre-commit-config.yaml +20 -0
  6. trodestrack-0.1.0/.python-version +1 -0
  7. trodestrack-0.1.0/CHANGELOG.dev-sessions.md +2218 -0
  8. trodestrack-0.1.0/CHANGELOG.md +101 -0
  9. trodestrack-0.1.0/CLAUDE.md +104 -0
  10. trodestrack-0.1.0/LICENSE +21 -0
  11. trodestrack-0.1.0/PKG-INFO +436 -0
  12. trodestrack-0.1.0/README.md +370 -0
  13. trodestrack-0.1.0/docs/TROUBLESHOOTING.md +822 -0
  14. trodestrack-0.1.0/docs/TUNING.md +549 -0
  15. trodestrack-0.1.0/docs/gen_ref_pages.py +83 -0
  16. trodestrack-0.1.0/docs/getting-started/index.md +51 -0
  17. trodestrack-0.1.0/docs/getting-started/installation.md +168 -0
  18. trodestrack-0.1.0/docs/getting-started/python-api.md +322 -0
  19. trodestrack-0.1.0/docs/getting-started/quickstart.md +121 -0
  20. trodestrack-0.1.0/docs/includes/abbreviations.md +25 -0
  21. trodestrack-0.1.0/docs/index.md +127 -0
  22. trodestrack-0.1.0/docs/javascripts/mathjax.js +19 -0
  23. trodestrack-0.1.0/docs/presentation/HANDOFF_PROMPT.md +428 -0
  24. trodestrack-0.1.0/docs/presentation/PRESENTATION_OUTLINE.md +252 -0
  25. trodestrack-0.1.0/docs/presentation/PROGRESS_REPORT.md +404 -0
  26. trodestrack-0.1.0/docs/presentation/README.md +214 -0
  27. trodestrack-0.1.0/docs/presentation/REVIEW_REPORT.md +383 -0
  28. trodestrack-0.1.0/docs/presentation/TASKS.md +389 -0
  29. trodestrack-0.1.0/docs/presentation/code/build_presentation.py +999 -0
  30. trodestrack-0.1.0/docs/presentation/code/create_camera_imu_clean.py +365 -0
  31. trodestrack-0.1.0/docs/presentation/code/create_camera_imu_simple.py +486 -0
  32. trodestrack-0.1.0/docs/presentation/code/create_camera_tracked_video.py +225 -0
  33. trodestrack-0.1.0/docs/presentation/code/create_ekf_smoother_video.py +199 -0
  34. trodestrack-0.1.0/docs/presentation/code/create_imu_tracking_video.py +480 -0
  35. trodestrack-0.1.0/docs/presentation/code/create_simple_imu_video.py +116 -0
  36. trodestrack-0.1.0/docs/presentation/code/generate_slide03_trajectory_comparison.py +268 -0
  37. trodestrack-0.1.0/docs/presentation/code/generate_slide05abc_imu_physics.py +567 -0
  38. trodestrack-0.1.0/docs/presentation/code/generate_slide08_beforeafter_video.py +560 -0
  39. trodestrack-0.1.0/docs/presentation/code/generate_slide12_imu_integration.py +394 -0
  40. trodestrack-0.1.0/docs/presentation/code/generate_slide14_uncertainty.py +360 -0
  41. trodestrack-0.1.0/docs/presentation/code/generate_slide16_smoother.py +334 -0
  42. trodestrack-0.1.0/docs/presentation/code/generate_slide21_nees.py +305 -0
  43. trodestrack-0.1.0/docs/presentation/code/presentation_standards.py +288 -0
  44. trodestrack-0.1.0/docs/presentation/code/presentation_utils.py +366 -0
  45. trodestrack-0.1.0/docs/presentation/visuals/slide03_trajectory_comparison.png +0 -0
  46. trodestrack-0.1.0/docs/presentation/visuals/slide05a_accelerometer_physics.png +0 -0
  47. trodestrack-0.1.0/docs/presentation/visuals/slide05b_gyroscope_physics.png +0 -0
  48. trodestrack-0.1.0/docs/presentation/visuals/slide05c_bias_correction.png +0 -0
  49. trodestrack-0.1.0/docs/presentation/visuals/slide12_imu_integration.png +0 -0
  50. trodestrack-0.1.0/docs/presentation/visuals/slide14_uncertainty.png +0 -0
  51. trodestrack-0.1.0/docs/presentation/visuals/slide16_smoother_comparison.png +0 -0
  52. trodestrack-0.1.0/docs/presentation/visuals/slide21_nees_histogram.png +0 -0
  53. trodestrack-0.1.0/docs/stylesheets/extra.css +114 -0
  54. trodestrack-0.1.0/docs/user-guide/index.md +138 -0
  55. trodestrack-0.1.0/docs/user-guide/state-layouts.md +309 -0
  56. trodestrack-0.1.0/docs/user-guide/troubleshooting.md +1 -0
  57. trodestrack-0.1.0/docs/user-guide/tuning.md +1 -0
  58. trodestrack-0.1.0/mkdocs.yml +95 -0
  59. trodestrack-0.1.0/pyproject.toml +219 -0
  60. trodestrack-0.1.0/src/trodestrack/__init__.py +82 -0
  61. trodestrack-0.1.0/src/trodestrack/cli/__init__.py +1 -0
  62. trodestrack-0.1.0/src/trodestrack/cli/online.py +352 -0
  63. trodestrack-0.1.0/src/trodestrack/cli/report.py +227 -0
  64. trodestrack-0.1.0/src/trodestrack/cli/smooth.py +381 -0
  65. trodestrack-0.1.0/src/trodestrack/cli/utils.py +63 -0
  66. trodestrack-0.1.0/src/trodestrack/models/__init__.py +5 -0
  67. trodestrack-0.1.0/src/trodestrack/models/ekf.py +678 -0
  68. trodestrack-0.1.0/src/trodestrack/models/filter_common.py +1474 -0
  69. trodestrack-0.1.0/src/trodestrack/models/filter_update.py +308 -0
  70. trodestrack-0.1.0/src/trodestrack/models/process_noise.py +308 -0
  71. trodestrack-0.1.0/src/trodestrack/models/sensors/__init__.py +18 -0
  72. trodestrack-0.1.0/src/trodestrack/models/sensors/camera_position.py +344 -0
  73. trodestrack-0.1.0/src/trodestrack/models/sensors/heading_pseudo.py +285 -0
  74. trodestrack-0.1.0/src/trodestrack/models/sensors/protocols.py +232 -0
  75. trodestrack-0.1.0/src/trodestrack/models/sensors/zupt.py +263 -0
  76. trodestrack-0.1.0/src/trodestrack/models/state_layout.py +279 -0
  77. trodestrack-0.1.0/src/trodestrack/models/ukf.py +905 -0
  78. trodestrack-0.1.0/src/trodestrack/py.typed +0 -0
  79. trodestrack-0.1.0/src/trodestrack/qa/__init__.py +50 -0
  80. trodestrack-0.1.0/src/trodestrack/qa/metrics.py +828 -0
  81. trodestrack-0.1.0/src/trodestrack/qa/plots.py +829 -0
  82. trodestrack-0.1.0/src/trodestrack/qa/report.py +457 -0
  83. trodestrack-0.1.0/src/trodestrack/runtime/__init__.py +5 -0
  84. trodestrack-0.1.0/src/trodestrack/runtime/offline.py +660 -0
  85. trodestrack-0.1.0/src/trodestrack/sim/__init__.py +5 -0
  86. trodestrack-0.1.0/src/trodestrack/sim/rat_imu.py +1028 -0
  87. trodestrack-0.1.0/src/trodestrack/sim/simple.py +591 -0
  88. trodestrack-0.1.0/src/trodestrack/sim/utils.py +317 -0
  89. trodestrack-0.1.0/src/trodestrack/viz/__init__.py +5 -0
  90. trodestrack-0.1.0/src/trodestrack/viz/components.py +1513 -0
  91. trodestrack-0.1.0/src/trodestrack/viz/styles.py +55 -0
  92. trodestrack-0.1.0/src/trodestrack/viz/utils.py +115 -0
  93. trodestrack-0.1.0/src/trodestrack/viz/video.py +754 -0
  94. trodestrack-0.1.0/tests/benchmark/__init__.py +0 -0
  95. trodestrack-0.1.0/tests/benchmark/test_throughput.py +290 -0
  96. trodestrack-0.1.0/tests/cli/test_online_command.py +238 -0
  97. trodestrack-0.1.0/tests/cli/test_report_command.py +190 -0
  98. trodestrack-0.1.0/tests/cli/test_smooth_command.py +235 -0
  99. trodestrack-0.1.0/tests/cli/test_utils.py +72 -0
  100. trodestrack-0.1.0/tests/filters/test_bias_observability.py +278 -0
  101. trodestrack-0.1.0/tests/filters/test_config_immutability.py +207 -0
  102. trodestrack-0.1.0/tests/filters/test_dropout_diagnostic.py +210 -0
  103. trodestrack-0.1.0/tests/filters/test_ekf_analytic.py +698 -0
  104. trodestrack-0.1.0/tests/filters/test_ekf_angle_wrapping.py +193 -0
  105. trodestrack-0.1.0/tests/filters/test_ekf_confidence_integration.py +252 -0
  106. trodestrack-0.1.0/tests/filters/test_ekf_confidence_scaling.py +318 -0
  107. trodestrack-0.1.0/tests/filters/test_ekf_gating.py +312 -0
  108. trodestrack-0.1.0/tests/filters/test_ekf_heading_measurement.py +562 -0
  109. trodestrack-0.1.0/tests/filters/test_ekf_partial_observations.py +264 -0
  110. trodestrack-0.1.0/tests/filters/test_joseph_form.py +309 -0
  111. trodestrack-0.1.0/tests/filters/test_prd_acceptance.py +591 -0
  112. trodestrack-0.1.0/tests/filters/test_robustness.py +631 -0
  113. trodestrack-0.1.0/tests/filters/test_ukf_accuracy.py +550 -0
  114. trodestrack-0.1.0/tests/filters/test_ukf_gating.py +87 -0
  115. trodestrack-0.1.0/tests/filters/test_ukf_heading_measurement.py +289 -0
  116. trodestrack-0.1.0/tests/filters/test_ukf_partial_observations.py +249 -0
  117. trodestrack-0.1.0/tests/filters/test_vision_robustness.py +451 -0
  118. trodestrack-0.1.0/tests/filters/test_zupt.py +386 -0
  119. trodestrack-0.1.0/tests/integration/__init__.py +0 -0
  120. trodestrack-0.1.0/tests/integration/test_prd_session.py +687 -0
  121. trodestrack-0.1.0/tests/models/sensors/__init__.py +1 -0
  122. trodestrack-0.1.0/tests/models/sensors/test_zupt.py +270 -0
  123. trodestrack-0.1.0/tests/models/test_confidence_scaling.py +26 -0
  124. trodestrack-0.1.0/tests/models/test_dynamics_3d_imu.py +437 -0
  125. trodestrack-0.1.0/tests/models/test_filter_common.py +224 -0
  126. trodestrack-0.1.0/tests/models/test_filter_update.py +453 -0
  127. trodestrack-0.1.0/tests/models/test_jit_wrappers.py +69 -0
  128. trodestrack-0.1.0/tests/models/test_layout_smoke.py +97 -0
  129. trodestrack-0.1.0/tests/models/test_process_noise.py +235 -0
  130. trodestrack-0.1.0/tests/models/test_sensor_protocols.py +454 -0
  131. trodestrack-0.1.0/tests/models/test_state_layout.py +295 -0
  132. trodestrack-0.1.0/tests/qa/test_metrics.py +738 -0
  133. trodestrack-0.1.0/tests/qa/test_plots.py +387 -0
  134. trodestrack-0.1.0/tests/qa/test_report.py +312 -0
  135. trodestrack-0.1.0/tests/regression/test_q_refactor_parity.py +143 -0
  136. trodestrack-0.1.0/tests/regression/test_smoother_q_refactor_parity.py +192 -0
  137. trodestrack-0.1.0/tests/runtime/test_offline_smoother.py +379 -0
  138. trodestrack-0.1.0/tests/runtime/test_offline_state_dim.py +422 -0
  139. trodestrack-0.1.0/tests/runtime/test_smoother_layout_smoke.py +64 -0
  140. trodestrack-0.1.0/tests/sim/__init__.py +0 -0
  141. trodestrack-0.1.0/tests/sim/test_anisotropic_drag.py +544 -0
  142. trodestrack-0.1.0/tests/sim/test_arena_physics.py +485 -0
  143. trodestrack-0.1.0/tests/sim/test_led_wall_reflections.py +313 -0
  144. trodestrack-0.1.0/tests/sim/test_persistent_led_swaps.py +283 -0
  145. trodestrack-0.1.0/tests/sim/test_prd_bounds.py +197 -0
  146. trodestrack-0.1.0/tests/sim/test_property_based.py +359 -0
  147. trodestrack-0.1.0/tests/sim/test_rat_imu.py +976 -0
  148. trodestrack-0.1.0/tests/sim/test_rat_imu_gravity.py +555 -0
  149. trodestrack-0.1.0/tests/sim/test_simple.py +538 -0
  150. trodestrack-0.1.0/tests/test_reproducibility.py +302 -0
  151. trodestrack-0.1.0/uv.lock +3391 -0
@@ -0,0 +1,94 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+ release:
8
+ types: [published]
9
+ workflow_dispatch:
10
+ inputs:
11
+ release_tag:
12
+ description: 'Release tag to publish (e.g., v0.1.0)'
13
+ required: true
14
+ type: string
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ build:
21
+ name: Build distribution
22
+ runs-on: ubuntu-latest
23
+
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ with:
27
+ ref: ${{ github.event.inputs.release_tag || github.ref }}
28
+
29
+ - name: Set up Python
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: '3.13'
33
+
34
+ - name: Install uv
35
+ uses: astral-sh/setup-uv@v3
36
+ with:
37
+ version: "latest"
38
+
39
+ - name: Install dependencies
40
+ run: |
41
+ uv sync --extra dev
42
+
43
+ - name: Build package
44
+ run: |
45
+ uv build
46
+
47
+ - name: Store the distribution packages
48
+ uses: actions/upload-artifact@v4
49
+ with:
50
+ name: python-package-distributions
51
+ path: dist/
52
+
53
+ publish-to-pypi:
54
+ name: Publish to PyPI
55
+ needs: [build]
56
+ runs-on: ubuntu-latest
57
+ environment:
58
+ name: pypi
59
+ url: https://pypi.org/p/trodestrack
60
+ permissions:
61
+ id-token: write # IMPORTANT: mandatory for trusted publishing
62
+
63
+ steps:
64
+ - name: Download all the dists
65
+ uses: actions/download-artifact@v4
66
+ with:
67
+ name: python-package-distributions
68
+ path: dist/
69
+
70
+ - name: Publish distribution to PyPI
71
+ uses: pypa/gh-action-pypi-publish@release/v1
72
+
73
+ publish-to-testpypi:
74
+ name: Publish to TestPyPI (for testing)
75
+ needs: [build]
76
+ runs-on: ubuntu-latest
77
+ if: github.event.release.prerelease
78
+ environment:
79
+ name: testpypi
80
+ url: https://test.pypi.org/p/trodestrack
81
+ permissions:
82
+ id-token: write
83
+
84
+ steps:
85
+ - name: Download all the dists
86
+ uses: actions/download-artifact@v4
87
+ with:
88
+ name: python-package-distributions
89
+ path: dist/
90
+
91
+ - name: Publish distribution to TestPyPI
92
+ uses: pypa/gh-action-pypi-publish@release/v1
93
+ with:
94
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,65 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+ pull_request:
9
+ branches:
10
+ - main
11
+ - master
12
+
13
+ permissions:
14
+ contents: read
15
+ pages: write
16
+ id-token: write
17
+
18
+ # Allow only one concurrent deployment, skipping runs queued between the run
19
+ # in-progress and latest queued. However, do NOT cancel in-progress runs as
20
+ # we want to allow these production deployments to complete.
21
+ concurrency:
22
+ group: "pages"
23
+ cancel-in-progress: false
24
+
25
+ jobs:
26
+ build:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+
31
+ - name: Set up Python
32
+ uses: actions/setup-python@v5
33
+ with:
34
+ python-version: '3.13'
35
+
36
+ - name: Install uv
37
+ uses: astral-sh/setup-uv@v3
38
+ with:
39
+ version: "latest"
40
+
41
+ - name: Install dependencies
42
+ run: |
43
+ uv sync --extra docs
44
+
45
+ - name: Build documentation
46
+ run: |
47
+ uv run mkdocs build --strict
48
+
49
+ - name: Upload artifact
50
+ if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
51
+ uses: actions/upload-pages-artifact@v3
52
+ with:
53
+ path: ./site
54
+
55
+ deploy:
56
+ if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
57
+ needs: build
58
+ runs-on: ubuntu-latest
59
+ environment:
60
+ name: github-pages
61
+ url: ${{ steps.deployment.outputs.page_url }}
62
+ steps:
63
+ - name: Deploy to GitHub Pages
64
+ id: deployment
65
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,72 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ${{ matrix.os }}
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ os: [ubuntu-latest, macos-latest, windows-latest]
18
+ python-version: ['3.11', '3.12', '3.13']
19
+
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+
28
+ - name: Install uv
29
+ uses: astral-sh/setup-uv@v3
30
+ with:
31
+ version: "latest"
32
+
33
+ - name: Install dependencies
34
+ run: |
35
+ uv sync --extra dev
36
+ env:
37
+ UV_PYTHON: python${{ matrix.python-version }}
38
+
39
+ - name: Run ruff check
40
+ run: |
41
+ uv run ruff check .
42
+ env:
43
+ UV_PYTHON: python${{ matrix.python-version }}
44
+
45
+ - name: Run ruff format check
46
+ run: |
47
+ uv run ruff format --check .
48
+ env:
49
+ UV_PYTHON: python${{ matrix.python-version }}
50
+
51
+ - name: Run mypy
52
+ run: |
53
+ uv run mypy src/trodestrack
54
+ continue-on-error: true # Don't fail build on type errors (yet)
55
+ env:
56
+ UV_PYTHON: python${{ matrix.python-version }}
57
+
58
+ - name: Run tests with coverage
59
+ run: |
60
+ uv run pytest --cov=src/trodestrack --cov-report=xml --cov-report=term
61
+ env:
62
+ MPLBACKEND: Agg # Use non-GUI backend for matplotlib
63
+ UV_PYTHON: python${{ matrix.python-version }}
64
+
65
+ - name: Upload coverage to Codecov
66
+ uses: codecov/codecov-action@v4
67
+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
68
+ with:
69
+ file: ./coverage.xml
70
+ fail_ci_if_error: false
71
+ env:
72
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,65 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ *.egg
9
+
10
+ # Virtual environments
11
+ .venv
12
+ .env
13
+ .env.*
14
+
15
+ # Testing artifacts
16
+ .pytest_cache/
17
+ .hypothesis/
18
+ .coverage
19
+ htmlcov/
20
+ .tox/
21
+ .nox/
22
+
23
+ # Type checking / Linting caches
24
+ .mypy_cache/
25
+ .ruff_cache/
26
+
27
+ # uv caches
28
+ .uv-cache/
29
+ .uv_cache/
30
+
31
+ # Documentation build output
32
+ site/
33
+
34
+ # Development artifacts
35
+ .DS_Store
36
+ *.zip
37
+
38
+ # IDE/Editor files
39
+ .vscode/
40
+ .idea/
41
+ *.swp
42
+ *.swo
43
+ *~
44
+
45
+ # Jupyter notebooks
46
+ .ipynb_checkpoints/
47
+
48
+ # Data files (typically large)
49
+ *.h5
50
+ *.hdf5
51
+ *.mat
52
+ *.npy
53
+ *.npz
54
+
55
+ # Generated calibration files
56
+ homography.yaml
57
+ calibration_*.yaml
58
+
59
+ # Log files
60
+ *.log
61
+ *.sh
62
+ *.mp4
63
+ examples/*.pdf
64
+ *.parquet
65
+ docs/presentation/trodestrack_presentation.pptx
@@ -0,0 +1,20 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-added-large-files
9
+ args: ['--maxkb=900']
10
+ - id: check-merge-conflict
11
+ - id: debug-statements
12
+
13
+ - repo: https://github.com/astral-sh/ruff-pre-commit
14
+ rev: v0.14.6
15
+ hooks:
16
+ - id: ruff
17
+ args: [--fix]
18
+ exclude: ^dynamax_code/
19
+ - id: ruff-format
20
+ exclude: ^dynamax_code/
@@ -0,0 +1 @@
1
+ 3.13