pysoarm 0.1.0__py3-none-any.whl
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.
Potentially problematic release.
This version of pysoarm might be problematic. Click here for more details.
- pysoarm/__init__.py +94 -0
- pysoarm/_version.py +22 -0
- pysoarm/arm.py +707 -0
- pysoarm/bridge.py +180 -0
- pysoarm/bus/__init__.py +101 -0
- pysoarm/bus/base.py +137 -0
- pysoarm/bus/fake.py +243 -0
- pysoarm/bus/registers.py +196 -0
- pysoarm/bus/rustypot.py +296 -0
- pysoarm/bus/scs.py +388 -0
- pysoarm/calibration.py +249 -0
- pysoarm/cli/__init__.py +10 -0
- pysoarm/cli/__main__.py +10 -0
- pysoarm/cli/main.py +400 -0
- pysoarm/constants.py +62 -0
- pysoarm/devices/__init__.py +5 -0
- pysoarm/devices/udev/99-pysoarm.rules +14 -0
- pysoarm/exceptions.py +97 -0
- pysoarm/kinematics/__init__.py +40 -0
- pysoarm/kinematics/base.py +175 -0
- pysoarm/kinematics/placo_solver.py +269 -0
- pysoarm/models/__init__.py +12 -0
- pysoarm/models/base.py +120 -0
- pysoarm/models/so101.py +68 -0
- pysoarm/py.typed +0 -0
- pysoarm/safety.py +181 -0
- pysoarm/state.py +77 -0
- pysoarm/trajectory.py +178 -0
- pysoarm-0.1.0.dist-info/METADATA +229 -0
- pysoarm-0.1.0.dist-info/RECORD +34 -0
- pysoarm-0.1.0.dist-info/WHEEL +4 -0
- pysoarm-0.1.0.dist-info/entry_points.txt +2 -0
- pysoarm-0.1.0.dist-info/licenses/LICENSE +202 -0
- pysoarm-0.1.0.dist-info/licenses/NOTICE +5 -0
pysoarm/__init__.py
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""pysoarm — lean, hardware-level Python API for SO-100/SO-101 robot arms.
|
|
2
|
+
|
|
3
|
+
The arm is six Feetech STS3215 serial-bus servos on one 1 Mbaud TTL bus. This package talks to
|
|
4
|
+
that bus directly: no datasets, no policies, no training stack.
|
|
5
|
+
|
|
6
|
+
Quick start::
|
|
7
|
+
|
|
8
|
+
from pysoarm import SOArm
|
|
9
|
+
|
|
10
|
+
with SOArm(port="/dev/so101_follower", calibration="follower.json") as arm:
|
|
11
|
+
state = arm.read_once()
|
|
12
|
+
arm.move_to([0, -30, 60, 0, 90, 40], duration=2.0)
|
|
13
|
+
|
|
14
|
+
Scope
|
|
15
|
+
-----
|
|
16
|
+
pysoarm is a **device-layer** SDK: teleoperation, dataset recording and policies are
|
|
17
|
+
deliberately out of scope (see ``docs/adr/0001-scope-device-layer.md``).
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
from pysoarm._version import __version__
|
|
23
|
+
from pysoarm.arm import LoopStats, SOArm
|
|
24
|
+
from pysoarm.bridge import ArmBridge, JointStateFrame
|
|
25
|
+
from pysoarm.bus import Backend, make_bus
|
|
26
|
+
from pysoarm.bus.base import Bus
|
|
27
|
+
from pysoarm.bus.fake import FakeBus
|
|
28
|
+
from pysoarm.bus.registers import REGISTERS, Register, RegisterKind, get_register
|
|
29
|
+
from pysoarm.bus.rustypot import RustypotBus
|
|
30
|
+
from pysoarm.bus.scs import ScsBus
|
|
31
|
+
from pysoarm.calibration import Calibration, JointCalibration
|
|
32
|
+
from pysoarm.constants import DEFAULT_BAUDRATE, DEFAULT_LOOP_HZ
|
|
33
|
+
from pysoarm.exceptions import (
|
|
34
|
+
BusConnectionError,
|
|
35
|
+
CalibrationError,
|
|
36
|
+
CommunicationError,
|
|
37
|
+
ConfigurationError,
|
|
38
|
+
KinematicsError,
|
|
39
|
+
NotReachableError,
|
|
40
|
+
PysoarmError,
|
|
41
|
+
SafetyViolation,
|
|
42
|
+
WatchdogTimeout,
|
|
43
|
+
)
|
|
44
|
+
from pysoarm.kinematics.base import Kinematics, Pose
|
|
45
|
+
from pysoarm.models import MODELS, SO100, SO101, RobotModel, get_model
|
|
46
|
+
from pysoarm.safety import SafetyLimits, SafetyReport, apply_guards
|
|
47
|
+
from pysoarm.state import ArmState
|
|
48
|
+
from pysoarm.trajectory import LinearRamp, MinimumJerk, ResampledTrajectory, Trajectory
|
|
49
|
+
|
|
50
|
+
__all__ = [
|
|
51
|
+
"DEFAULT_BAUDRATE",
|
|
52
|
+
"DEFAULT_LOOP_HZ",
|
|
53
|
+
"MODELS",
|
|
54
|
+
"REGISTERS",
|
|
55
|
+
"SO100",
|
|
56
|
+
"SO101",
|
|
57
|
+
"ArmBridge",
|
|
58
|
+
"ArmState",
|
|
59
|
+
"Backend",
|
|
60
|
+
"Bus",
|
|
61
|
+
"BusConnectionError",
|
|
62
|
+
"Calibration",
|
|
63
|
+
"CalibrationError",
|
|
64
|
+
"CommunicationError",
|
|
65
|
+
"ConfigurationError",
|
|
66
|
+
"FakeBus",
|
|
67
|
+
"JointCalibration",
|
|
68
|
+
"JointStateFrame",
|
|
69
|
+
"Kinematics",
|
|
70
|
+
"KinematicsError",
|
|
71
|
+
"LinearRamp",
|
|
72
|
+
"LoopStats",
|
|
73
|
+
"MinimumJerk",
|
|
74
|
+
"NotReachableError",
|
|
75
|
+
"Pose",
|
|
76
|
+
"PysoarmError",
|
|
77
|
+
"Register",
|
|
78
|
+
"RegisterKind",
|
|
79
|
+
"ResampledTrajectory",
|
|
80
|
+
"RobotModel",
|
|
81
|
+
"RustypotBus",
|
|
82
|
+
"SOArm",
|
|
83
|
+
"SafetyLimits",
|
|
84
|
+
"SafetyReport",
|
|
85
|
+
"SafetyViolation",
|
|
86
|
+
"ScsBus",
|
|
87
|
+
"Trajectory",
|
|
88
|
+
"WatchdogTimeout",
|
|
89
|
+
"__version__",
|
|
90
|
+
"apply_guards",
|
|
91
|
+
"get_model",
|
|
92
|
+
"get_register",
|
|
93
|
+
"make_bus",
|
|
94
|
+
]
|
pysoarm/_version.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Single source of truth for the runtime version.
|
|
2
|
+
|
|
3
|
+
``importlib.metadata`` reads it from the installed distribution, so the number in
|
|
4
|
+
``pyproject.toml`` is authoritative; a source checkout that was never installed falls back to a
|
|
5
|
+
PEP 440 local version instead of failing.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from importlib import metadata
|
|
11
|
+
|
|
12
|
+
__all__ = ["__version__"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _resolve() -> str:
|
|
16
|
+
try:
|
|
17
|
+
return metadata.version("pysoarm")
|
|
18
|
+
except metadata.PackageNotFoundError: # running from a source tree
|
|
19
|
+
return "0.0.0+unknown"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
__version__ = _resolve()
|