armnet-core 0.3.0__tar.gz → 0.3.2__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 (29) hide show
  1. {armnet_core-0.3.0 → armnet_core-0.3.2}/.gitignore +4 -0
  2. {armnet_core-0.3.0 → armnet_core-0.3.2}/PKG-INFO +15 -1
  3. {armnet_core-0.3.0 → armnet_core-0.3.2}/README.md +14 -0
  4. {armnet_core-0.3.0 → armnet_core-0.3.2}/pyproject.toml +1 -1
  5. armnet_core-0.3.2/src/armnet_core/__init__.py +175 -0
  6. {armnet_core-0.3.0 → armnet_core-0.3.2}/src/armnet_core/environment.py +13 -1
  7. armnet_core-0.3.2/src/armnet_core/manual_reset.py +656 -0
  8. armnet_core-0.3.2/src/armnet_core/models.py +1348 -0
  9. armnet_core-0.3.2/src/armnet_core/scene_calibration.py +413 -0
  10. armnet_core-0.3.2/tests/test_cell_device_config.py +138 -0
  11. armnet_core-0.3.2/tests/test_job_ids.py +33 -0
  12. armnet_core-0.3.2/tests/test_job_spec.py +19 -0
  13. armnet_core-0.3.2/tests/test_manual_reset.py +469 -0
  14. armnet_core-0.3.2/tests/test_manual_reset_size_guide.py +49 -0
  15. {armnet_core-0.3.0 → armnet_core-0.3.2}/tests/test_package_version.py +5 -4
  16. armnet_core-0.3.2/tests/test_robot_cell_config.py +488 -0
  17. armnet_core-0.3.2/tests/test_scene_calibration.py +147 -0
  18. armnet_core-0.3.2/tests/test_yam_cell_config.py +614 -0
  19. armnet_core-0.3.2/tests/yam_fixtures.py +147 -0
  20. armnet_core-0.3.0/src/armnet_core/__init__.py +0 -115
  21. armnet_core-0.3.0/src/armnet_core/models.py +0 -682
  22. armnet_core-0.3.0/tests/test_robot_cell_config.py +0 -134
  23. {armnet_core-0.3.0 → armnet_core-0.3.2}/LICENSE +0 -0
  24. {armnet_core-0.3.0 → armnet_core-0.3.2}/src/armnet_core/auth.py +0 -0
  25. {armnet_core-0.3.0 → armnet_core-0.3.2}/src/armnet_core/enums.py +0 -0
  26. {armnet_core-0.3.0 → armnet_core-0.3.2}/src/armnet_core/env.py +0 -0
  27. {armnet_core-0.3.0 → armnet_core-0.3.2}/src/armnet_core/markers.py +0 -0
  28. {armnet_core-0.3.0 → armnet_core-0.3.2}/src/armnet_core/volume_sync.py +0 -0
  29. {armnet_core-0.3.0 → armnet_core-0.3.2}/tests/test_volume_sync.py +0 -0
@@ -174,6 +174,10 @@ wandb
174
174
  logfile.asc
175
175
  armnet/robot_cell.json
176
176
 
177
+ # Rail servo current-profiling captures (bench artefacts; findings live in
178
+ # docs/plans/2026-08-10-rail-axis-bring-up-calibration.md)
179
+ armnet/rail-current-*.csv
180
+
177
181
  # cpp
178
182
  devel
179
183
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: armnet-core
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Shared wire types for the armnet platform: Embodiment, Task, JobSpec, JobResult, Job, JobStatus.
5
5
  Project-URL: Homepage, https://armnet.dev
6
6
  Project-URL: Documentation, https://docs.armnet.dev/packages/core/
@@ -35,3 +35,17 @@ pip install armnet-core
35
35
  ## Documentation
36
36
 
37
37
  Full guides and API reference: **<https://docs.armnet.dev/packages/core/>**
38
+
39
+ ## Task-driven manual resets
40
+
41
+ `ManualResetConfig` validates up to 12 ordered, uniquely named `point` or
42
+ `bounding_box` elements. Elements use `ShirtSize` values for edge clearance and
43
+ box dimensions, plus a `rotation_range_degrees` from 0 through 180.
44
+
45
+ `sample_manual_reset_layout(...)` deterministically places every complete
46
+ footprint in source-pixel space, respecting calibrated concave polygons,
47
+ clearance and object non-overlap. It returns normalized point/box/arrow geometry
48
+ for renderers and raises `ManualResetLayoutError` after bounded retries when a
49
+ configuration cannot fit. `EDGE_DISTANCE_SCALES`, `BOX_LENGTH_SCALES`, and
50
+ `POINT_RADIUS_SCALE` are the central sizing constants used by both sampling and
51
+ the sizing-guide script.
@@ -20,3 +20,17 @@ pip install armnet-core
20
20
  ## Documentation
21
21
 
22
22
  Full guides and API reference: **<https://docs.armnet.dev/packages/core/>**
23
+
24
+ ## Task-driven manual resets
25
+
26
+ `ManualResetConfig` validates up to 12 ordered, uniquely named `point` or
27
+ `bounding_box` elements. Elements use `ShirtSize` values for edge clearance and
28
+ box dimensions, plus a `rotation_range_degrees` from 0 through 180.
29
+
30
+ `sample_manual_reset_layout(...)` deterministically places every complete
31
+ footprint in source-pixel space, respecting calibrated concave polygons,
32
+ clearance and object non-overlap. It returns normalized point/box/arrow geometry
33
+ for renderers and raises `ManualResetLayoutError` after bounded retries when a
34
+ configuration cannot fit. `EDGE_DISTANCE_SCALES`, `BOX_LENGTH_SCALES`, and
35
+ `POINT_RADIUS_SCALE` are the central sizing constants used by both sampling and
36
+ the sizing-guide script.
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
  name = "armnet-core"
7
7
  # 0.2.0 is a wire break: a cell reports the `environment` it is set up for in
8
8
  # place of a single `task`, so 0.1.x cannot read a cell-status response.
9
- version = "0.3.0"
9
+ version = "0.3.2"
10
10
  description = "Shared wire types for the armnet platform: Embodiment, Task, JobSpec, JobResult, Job, JobStatus."
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.12,<3.13"
@@ -0,0 +1,175 @@
1
+ """Shared wire types for the armnet platform.
2
+
3
+ Single source of truth for everything that crosses a component boundary
4
+ (orchestrator HTTP API request/response bodies, NATS message envelopes,
5
+ runtime SDK return values).
6
+ """
7
+
8
+ from importlib.metadata import PackageNotFoundError as _PackageNotFound
9
+ from importlib.metadata import version as _package_version
10
+
11
+ from armnet_core.auth import API_KEY_ENV, API_KEY_HEADER
12
+ from armnet_core.enums import (DEFAULT_EMBODIMENT, DEFAULT_ENVIRONMENT,
13
+ DEFAULT_TASK, Embodiment)
14
+ from armnet_core.enums import Environment as EnvironmentName
15
+ from armnet_core.enums import Task
16
+ from armnet_core.environment import (CompletionStatus, Environment,
17
+ EnvironmentNotFound, InstrumentedCell,
18
+ Reading, TaskSpec, available_environments,
19
+ environment_for, task_environment)
20
+ from armnet_core.manual_reset import (
21
+ BOX_LENGTH_SCALES,
22
+ DEFAULT_LAYOUT_ATTEMPTS,
23
+ EDGE_DISTANCE_SCALES,
24
+ MAX_MANUAL_RESET_ELEMENTS,
25
+ POINT_ARROW_LENGTH_SCALE,
26
+ POINT_RADIUS_SCALE,
27
+ ManualResetBoundingBox,
28
+ ManualResetBoundingBoxGeometry,
29
+ ManualResetConfig,
30
+ ManualResetElement,
31
+ ManualResetElementGeometry,
32
+ ManualResetLayout,
33
+ ManualResetLayoutError,
34
+ ManualResetPoint,
35
+ ManualResetPointGeometry,
36
+ NormalizedLine,
37
+ ShirtSize,
38
+ sample_manual_reset_layout,
39
+ )
40
+ from armnet_core.models import (BIMANUAL_YAM_EMBODIMENT, TELEOP_EVENT_NEXT_EPISODE,
41
+ TELEOP_EVENT_RERECORD_EPISODE,
42
+ TELEOP_EVENT_STOP_RECORDING, TELEOP_EVENTS,
43
+ VARIATION_CLIP_SIGMA, YAM_ARM_JOINTS,
44
+ YAM_ARM_PORTS, YAM_CAMERA_INDEX_OR_PATH,
45
+ YAM_CAMERA_NAMES, YAM_JOINTS,
46
+ CameraMountVariation,
47
+ CellDeviceConfig, CellRuntimeStatus, CellStatus,
48
+ CellStatusSummary, CurrentGateConfig,
49
+ EmbodimentInfo, EmbodimentList, Job, JobResult,
50
+ JobId, JobSpec, JobStatus, JobStatusTransition,
51
+ OffCurrentGateConfig,
52
+ PercentileCurrentGateConfig, RailConfig,
53
+ RailVariation, RegistryCredentials,
54
+ RemoteExecutionError, RobotArmConfig,
55
+ RobotCellConfig, SecretCreateRequest,
56
+ SecretInfo, SecretList, TaskInfo, TaskList,
57
+ TeleopAction, TeleopEvent, TerminalStatus,
58
+ TrackingStallConfig, UniformCurrentGateConfig, VariationAxis,
59
+ VolumeCredentials, WhoAmI, YamArmDriverConfig,
60
+ canonical_job_id)
61
+ from armnet_core.scene_calibration import (
62
+ FULL_FRAME_VERTICES,
63
+ MIN_NORMALIZED_POLYGON_AREA,
64
+ NormalizedPoint,
65
+ SceneCalibration,
66
+ normalized_to_pixel,
67
+ pixel_to_normalized,
68
+ point_in_polygon,
69
+ polygon_area,
70
+ sample_scene_target,
71
+ validate_normalized_polygon,
72
+ )
73
+
74
+ __all__ = [
75
+ "API_KEY_ENV",
76
+ "API_KEY_HEADER",
77
+ "BIMANUAL_YAM_EMBODIMENT",
78
+ "BOX_LENGTH_SCALES",
79
+ "DEFAULT_LAYOUT_ATTEMPTS",
80
+ "DEFAULT_EMBODIMENT",
81
+ "DEFAULT_ENVIRONMENT",
82
+ "DEFAULT_TASK",
83
+ "Embodiment",
84
+ "EDGE_DISTANCE_SCALES",
85
+ "CameraMountVariation",
86
+ "CellDeviceConfig",
87
+ "CellRuntimeStatus",
88
+ "CellStatus",
89
+ "CellStatusSummary",
90
+ "CurrentGateConfig",
91
+ "CompletionStatus",
92
+ "EmbodimentInfo",
93
+ "EmbodimentList",
94
+ "Environment",
95
+ "EnvironmentName",
96
+ "EnvironmentNotFound",
97
+ "FULL_FRAME_VERTICES",
98
+ "InstrumentedCell",
99
+ "Reading",
100
+ "TaskSpec",
101
+ "available_environments",
102
+ "canonical_job_id",
103
+ "environment_for",
104
+ "task_environment",
105
+ "Job",
106
+ "JobId",
107
+ "JobResult",
108
+ "JobStatusTransition",
109
+ "JobSpec",
110
+ "JobStatus",
111
+ "MAX_MANUAL_RESET_ELEMENTS",
112
+ "ManualResetBoundingBox",
113
+ "ManualResetBoundingBoxGeometry",
114
+ "ManualResetConfig",
115
+ "ManualResetElement",
116
+ "ManualResetElementGeometry",
117
+ "ManualResetLayout",
118
+ "ManualResetLayoutError",
119
+ "ManualResetPoint",
120
+ "ManualResetPointGeometry",
121
+ "MIN_NORMALIZED_POLYGON_AREA",
122
+ "NormalizedPoint",
123
+ "NormalizedLine",
124
+ "OffCurrentGateConfig",
125
+ "PercentileCurrentGateConfig",
126
+ "RailConfig",
127
+ "RailVariation",
128
+ "RegistryCredentials",
129
+ "RemoteExecutionError",
130
+ "RobotArmConfig",
131
+ "RobotCellConfig",
132
+ "SceneCalibration",
133
+ "ShirtSize",
134
+ "SecretCreateRequest",
135
+ "SecretInfo",
136
+ "SecretList",
137
+ "Task",
138
+ "TaskInfo",
139
+ "TaskList",
140
+ "TELEOP_EVENT_NEXT_EPISODE",
141
+ "TELEOP_EVENT_RERECORD_EPISODE",
142
+ "TELEOP_EVENT_STOP_RECORDING",
143
+ "TELEOP_EVENTS",
144
+ "TeleopAction",
145
+ "TeleopEvent",
146
+ "TerminalStatus",
147
+ "TrackingStallConfig",
148
+ "UniformCurrentGateConfig",
149
+ "VARIATION_CLIP_SIGMA",
150
+ "POINT_ARROW_LENGTH_SCALE",
151
+ "POINT_RADIUS_SCALE",
152
+ "VariationAxis",
153
+ "VolumeCredentials",
154
+ "WhoAmI",
155
+ "YAM_ARM_JOINTS",
156
+ "YAM_ARM_PORTS",
157
+ "YAM_CAMERA_INDEX_OR_PATH",
158
+ "YAM_CAMERA_NAMES",
159
+ "YAM_JOINTS",
160
+ "YamArmDriverConfig",
161
+ "normalized_to_pixel",
162
+ "pixel_to_normalized",
163
+ "point_in_polygon",
164
+ "polygon_area",
165
+ "sample_scene_target",
166
+ "sample_manual_reset_layout",
167
+ "validate_normalized_polygon",
168
+ ]
169
+
170
+ # Read from installed metadata so the version lives in pyproject.toml only; a
171
+ # second hand-edited copy here is one more thing to forget on a release.
172
+ try:
173
+ __version__ = _package_version("armnet-core")
174
+ except _PackageNotFound: # running from a source tree with nothing installed
175
+ __version__ = "0.0.0+unknown"
@@ -140,12 +140,24 @@ class InstrumentedCell(Protocol):
140
140
  can see. Channels that read nothing still abstain.
141
141
  """
142
142
 
143
- def reset_scene(self, *, confirm: bool, reset_cell: Callable[[bool], None]) -> None:
143
+ def reset_scene(
144
+ self,
145
+ *,
146
+ confirm: bool,
147
+ reset_cell: Callable[[bool], None],
148
+ set_rail: Callable[[float], None] | None = None,
149
+ ) -> None:
144
150
  """Restore the state this task starts from.
145
151
 
146
152
  ``reset_cell`` returns the arm to rest and, when passed ``True``, waits
147
153
  for an operator. Implementations decide whether a human is needed;
148
154
  ``confirm=True`` means the caller has already decided one is.
155
+
156
+ ``set_rail``, when provided, temporarily positions the cell's rails to a
157
+ 0..1 staging fraction before replaying keypoints authored at that pose.
158
+ The runtime restores every rail to its job episode position after
159
+ ``reset_scene`` returns or fails; environments must not treat the plan
160
+ pose as a replacement for the job position.
149
161
  """
150
162
 
151
163
  def attach_dataset(self, dataset_root: Any) -> None: