No project description provided
Project description
realtime-smm
This project is the official codebase for the T-RO paper A Learning-Based Method for Computing Self-Motion Manifolds of Redundant Robots for Real-Time Fault-Tolerant Motion Planning.
realtime-smm is a learning-based toolkit for computing self-motion manifolds (SMMs) of redundant robots fast enough for realtime global motion planning.
Overview
- Cache-focused data pipeline that stores raw and post-processed SMM samples during grid construction.
- Per-cluster neural regressors trained on Fourier-series targets with optional low-pass filtering and XY half-plane canonicalisation.
- Bundled inference model (
SMMNetworkBundle) that selects the correct regressor with a classifier, reconstructs joint trajectories, and can upsample output resolutions. - Optional basin-hopping pretraining (via
pytorch-minimize) before standard PyTorch optimisers to help escape poor initialisations. - Example notebook-style script (
examples/smms_3r.py) that trains, loads, and visualises overlays against analytical solutions.
Features
- Caching: Uses
platformdirsto create per-run cache folders that persist raw grids, post-processed clusters, and trained models. - Cluster-centric training: Each connected workspace cluster yields its own neural network while a classifier predicts the correct cluster at inference time.
- Fourier targets: SMMs are transformed to Fourier space, optionally truncated with
fft_cutoff, and reconstructed via analytic IFFT for smooth representation. - XY half-plane canonicalisation: Input transforms are rotated into a canonical frame, with the orientation offset reapplied after prediction.
- Upsampling:
SMMNetworkBundle.__call__supportssamples=to evaluate the learned Fourier representation at arbitrary resolutions. - Progress feedback: Training loops use
tqdmprogress bars when available and log final losses per cluster.
Installation
pip install realtime-smm
Optional basin-hopping pretraining relies on pytorch-minimize, which is not
published on PyPI. Install it manually if you plan to use that feature:
pip install git+https://github.com/gngdb/pytorch-minimize.git
Using Poetry:
poetry install
pip install git+https://github.com/gngdb/pytorch-minimize.git
Quickstart
realtime-smm exposes a narrow public surface in realtime_smm.main:
from realtime_smm import (
Robot,
GridParams,
SMMSolverParams,
TrainingConfig,
training_pipeline,
load_trained_bundle,
)
robot = Robot([...]) # Define DH links
grid_params = GridParams(pos_resolution=0.01, use_xy_halfplane=True)
smm_params = SMMSolverParams(samples=64)
config = TrainingConfig(epochs=1000, fft_cutoff=20)
bundle = training_pipeline(
robot,
grid_params=grid_params,
smm_params=smm_params,
training_config=config,
name="my_robot_run",
)
bundle = load_trained_bundle(name="my_robot_run")
T = np.eye(4)
ws_smms = bundle(T, samples=256) # Predict upsampled SMMs
Only call the top-level helpers from main.py and adjust behaviour through the configuration dataclasses re-exported in __init__.py.
Cache Management
You can clear cached runs when experimenting:
from realtime_smm import clear_cache
clear_cache(name="my_robot_run") # Remove a single run
clear_cache() # Prompt before clearing every cache directory
Examples
examples/smms_3r.py demonstrates the full workflow, including plotting predicted vs. analytical SMM projections. Run it after installation to sanity-check dependencies and visualise results.
License
MIT. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file realtime_smm-0.1.2.tar.gz.
File metadata
- Download URL: realtime_smm-0.1.2.tar.gz
- Upload date:
- Size: 36.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d89152b88646c655fa16b6700fb2b3e28cf4dce76af505ec2b8463c7dd2928d0
|
|
| MD5 |
6a23f74ab0a95f482ec34aed237688e4
|
|
| BLAKE2b-256 |
adfee03b9a99c46ffddbdc8db6e77af62aa25e291b9d9aade47dc6c7995d28a9
|
Provenance
The following attestation bundles were made for realtime_smm-0.1.2.tar.gz:
Publisher:
publish.yaml on landonclark97/realtime-smm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
realtime_smm-0.1.2.tar.gz -
Subject digest:
d89152b88646c655fa16b6700fb2b3e28cf4dce76af505ec2b8463c7dd2928d0 - Sigstore transparency entry: 677951518
- Sigstore integration time:
-
Permalink:
landonclark97/realtime-smm@2fcf892bf3528316d2c0c8c36fa8873c80b5202d -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/landonclark97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@2fcf892bf3528316d2c0c8c36fa8873c80b5202d -
Trigger Event:
release
-
Statement type:
File details
Details for the file realtime_smm-0.1.2-py3-none-any.whl.
File metadata
- Download URL: realtime_smm-0.1.2-py3-none-any.whl
- Upload date:
- Size: 41.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
155f9d5769a9462cef94053f5b59308a23731d6259cf0c9225f40d84118ae0a8
|
|
| MD5 |
8d714d99e098959e80926af20060cea6
|
|
| BLAKE2b-256 |
f94a6dafbca67fdecd1db4b8065154244d5a1158a1fadae8d854feabdd31e6e3
|
Provenance
The following attestation bundles were made for realtime_smm-0.1.2-py3-none-any.whl:
Publisher:
publish.yaml on landonclark97/realtime-smm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
realtime_smm-0.1.2-py3-none-any.whl -
Subject digest:
155f9d5769a9462cef94053f5b59308a23731d6259cf0c9225f40d84118ae0a8 - Sigstore transparency entry: 677951559
- Sigstore integration time:
-
Permalink:
landonclark97/realtime-smm@2fcf892bf3528316d2c0c8c36fa8873c80b5202d -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/landonclark97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@2fcf892bf3528316d2c0c8c36fa8873c80b5202d -
Trigger Event:
release
-
Statement type: