antioch-py 2.2.3__tar.gz → 3.0.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.

Potentially problematic release.


This version of antioch-py might be problematic. Click here for more details.

Files changed (120) hide show
  1. antioch_py-3.0.0/LICENSE +21 -0
  2. {antioch_py-2.2.3/antioch_py.egg-info → antioch_py-3.0.0}/PKG-INFO +8 -11
  3. antioch_py-3.0.0/README.md +105 -0
  4. {antioch_py-2.2.3 → antioch_py-3.0.0}/README.pypi.md +0 -2
  5. antioch_py-2.2.3/antioch/message.py → antioch_py-3.0.0/antioch/__init__.py +16 -2
  6. {antioch_py-2.2.3/antioch/module → antioch_py-3.0.0/antioch}/execution.py +1 -1
  7. {antioch_py-2.2.3/antioch/module → antioch_py-3.0.0/antioch}/input.py +2 -4
  8. {antioch_py-2.2.3/antioch/module → antioch_py-3.0.0/antioch}/module.py +17 -34
  9. {antioch_py-2.2.3/antioch/module → antioch_py-3.0.0/antioch}/node.py +17 -16
  10. {antioch_py-2.2.3 → antioch_py-3.0.0/antioch_py.egg-info}/PKG-INFO +8 -11
  11. antioch_py-3.0.0/antioch_py.egg-info/SOURCES.txt +66 -0
  12. {antioch_py-2.2.3 → antioch_py-3.0.0}/antioch_py.egg-info/requires.txt +2 -5
  13. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/ark/__init__.py +6 -16
  14. antioch_py-3.0.0/common/ark/ark.py +91 -0
  15. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/ark/hardware.py +1 -1
  16. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/ark/kinematics.py +1 -1
  17. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/ark/module.py +22 -0
  18. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/ark/node.py +46 -3
  19. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/ark/scheduler.py +2 -29
  20. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/ark/sim.py +1 -1
  21. {antioch_py-2.2.3/antioch/module → antioch_py-3.0.0/common/ark}/token.py +17 -0
  22. antioch_py-3.0.0/common/assets/rigging.usd +0 -0
  23. antioch_py-3.0.0/common/constants.py +119 -0
  24. antioch_py-3.0.0/common/core/__init__.py +65 -0
  25. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/core/auth.py +87 -112
  26. antioch_py-3.0.0/common/core/container.py +261 -0
  27. antioch_py-3.0.0/common/core/registry.py +310 -0
  28. antioch_py-3.0.0/common/core/rome.py +251 -0
  29. antioch_py-3.0.0/common/core/telemetry.py +176 -0
  30. antioch_py-3.0.0/common/core/types.py +219 -0
  31. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/message/__init__.py +19 -5
  32. antioch_py-3.0.0/common/message/annotation.py +240 -0
  33. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/message/array.py +25 -1
  34. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/message/camera.py +23 -1
  35. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/message/color.py +32 -6
  36. antioch_py-3.0.0/common/message/detection.py +40 -0
  37. antioch_py-3.0.0/common/message/foxglove.py +20 -0
  38. antioch_py-3.0.0/common/message/frame.py +114 -0
  39. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/message/image.py +58 -9
  40. antioch_py-3.0.0/common/message/imu.py +34 -0
  41. antioch_py-3.0.0/common/message/joint.py +106 -0
  42. antioch_py-3.0.0/common/message/log.py +76 -0
  43. antioch_py-3.0.0/common/message/pir.py +33 -0
  44. antioch_py-3.0.0/common/message/plot.py +57 -0
  45. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/message/point.py +55 -6
  46. antioch_py-3.0.0/common/message/point_cloud.py +99 -0
  47. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/message/pose.py +59 -19
  48. antioch_py-3.0.0/common/message/quaternion.py +286 -0
  49. antioch_py-3.0.0/common/message/radar.py +224 -0
  50. antioch_py-3.0.0/common/message/twist.py +34 -0
  51. antioch_py-3.0.0/common/message/types.py +72 -0
  52. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/message/vector.py +180 -245
  53. antioch_py-3.0.0/common/sim/__init__.py +49 -0
  54. antioch_py-2.2.3/common/session/config.py → antioch_py-3.0.0/common/sim/objects.py +97 -27
  55. antioch_py-3.0.0/common/sim/state.py +11 -0
  56. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/utils/comms.py +30 -12
  57. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/utils/logger.py +26 -7
  58. {antioch_py-2.2.3 → antioch_py-3.0.0}/pyproject.toml +11 -25
  59. antioch_py-2.2.3/README.md +0 -73
  60. antioch_py-2.2.3/antioch/module/__init__.py +0 -53
  61. antioch_py-2.2.3/antioch/session/__init__.py +0 -152
  62. antioch_py-2.2.3/antioch/session/ark.py +0 -500
  63. antioch_py-2.2.3/antioch/session/asset.py +0 -65
  64. antioch_py-2.2.3/antioch/session/error.py +0 -80
  65. antioch_py-2.2.3/antioch/session/objects/__init__.py +0 -40
  66. antioch_py-2.2.3/antioch/session/objects/animation.py +0 -162
  67. antioch_py-2.2.3/antioch/session/objects/articulation.py +0 -180
  68. antioch_py-2.2.3/antioch/session/objects/basis_curve.py +0 -180
  69. antioch_py-2.2.3/antioch/session/objects/camera.py +0 -65
  70. antioch_py-2.2.3/antioch/session/objects/collision.py +0 -46
  71. antioch_py-2.2.3/antioch/session/objects/geometry.py +0 -58
  72. antioch_py-2.2.3/antioch/session/objects/ground_plane.py +0 -48
  73. antioch_py-2.2.3/antioch/session/objects/imu.py +0 -53
  74. antioch_py-2.2.3/antioch/session/objects/joint.py +0 -49
  75. antioch_py-2.2.3/antioch/session/objects/light.py +0 -123
  76. antioch_py-2.2.3/antioch/session/objects/pir_sensor.py +0 -98
  77. antioch_py-2.2.3/antioch/session/objects/radar.py +0 -62
  78. antioch_py-2.2.3/antioch/session/objects/rigid_body.py +0 -197
  79. antioch_py-2.2.3/antioch/session/objects/xform.py +0 -119
  80. antioch_py-2.2.3/antioch/session/record.py +0 -158
  81. antioch_py-2.2.3/antioch/session/scene.py +0 -1544
  82. antioch_py-2.2.3/antioch/session/session.py +0 -211
  83. antioch_py-2.2.3/antioch/session/task.py +0 -309
  84. antioch_py-2.2.3/antioch_py.egg-info/SOURCES.txt +0 -90
  85. antioch_py-2.2.3/antioch_py.egg-info/entry_points.txt +0 -2
  86. antioch_py-2.2.3/common/__init__.py +0 -0
  87. antioch_py-2.2.3/common/ark/ark.py +0 -130
  88. antioch_py-2.2.3/common/constants.py +0 -61
  89. antioch_py-2.2.3/common/core/__init__.py +0 -52
  90. antioch_py-2.2.3/common/core/agent.py +0 -324
  91. antioch_py-2.2.3/common/core/registry.py +0 -331
  92. antioch_py-2.2.3/common/core/task.py +0 -36
  93. antioch_py-2.2.3/common/message/annotation.py +0 -89
  94. antioch_py-2.2.3/common/message/frame.py +0 -50
  95. antioch_py-2.2.3/common/message/imu.py +0 -14
  96. antioch_py-2.2.3/common/message/joint.py +0 -47
  97. antioch_py-2.2.3/common/message/log.py +0 -31
  98. antioch_py-2.2.3/common/message/pir.py +0 -18
  99. antioch_py-2.2.3/common/message/point_cloud.py +0 -63
  100. antioch_py-2.2.3/common/message/quaternion.py +0 -273
  101. antioch_py-2.2.3/common/message/radar.py +0 -58
  102. antioch_py-2.2.3/common/message/types.py +0 -37
  103. antioch_py-2.2.3/common/message/velocity.py +0 -11
  104. antioch_py-2.2.3/common/rome/__init__.py +0 -9
  105. antioch_py-2.2.3/common/rome/client.py +0 -430
  106. antioch_py-2.2.3/common/rome/error.py +0 -16
  107. antioch_py-2.2.3/common/session/__init__.py +0 -31
  108. antioch_py-2.2.3/common/session/environment.py +0 -31
  109. antioch_py-2.2.3/common/session/sim.py +0 -129
  110. antioch_py-2.2.3/common/utils/usd.py +0 -12
  111. {antioch_py-2.2.3 → antioch_py-3.0.0}/MANIFEST.in +0 -0
  112. {antioch_py-2.2.3/antioch/module → antioch_py-3.0.0/antioch}/clock.py +0 -0
  113. {antioch_py-2.2.3 → antioch_py-3.0.0}/antioch_py.egg-info/dependency_links.txt +0 -0
  114. {antioch_py-2.2.3 → antioch_py-3.0.0}/antioch_py.egg-info/top_level.txt +0 -0
  115. {antioch_py-2.2.3/antioch → antioch_py-3.0.0/common}/__init__.py +0 -0
  116. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/assets/__init__.py +0 -0
  117. /antioch_py-2.2.3/common/message/base.py → /antioch_py-3.0.0/common/message/message.py +0 -0
  118. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/utils/__init__.py +0 -0
  119. {antioch_py-2.2.3 → antioch_py-3.0.0}/common/utils/time.py +0 -0
  120. {antioch_py-2.2.3 → antioch_py-3.0.0}/setup.cfg +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2026 Antioch
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,23 +1,24 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: antioch-py
3
- Version: 2.2.3
4
- Summary: The Antioch Python SDK
3
+ Version: 3.0.0
4
+ Summary: Antioch Python Module SDK
5
5
  Author-email: Antioch Robotics <support@antioch.dev>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://antioch.com
8
- Keywords: robotics,simulation,middleware,sdk
8
+ Keywords: robotics,simulation,middleware,sdk,modules
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Intended Audience :: Developers
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
14
14
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
- Requires-Python: <3.13,>=3.12
15
+ Requires-Python: <3.13,>=3.10
16
16
  Description-Content-Type: text/markdown
17
+ License-File: LICENSE
17
18
  Requires-Dist: click>=8.0.0
18
- Requires-Dist: click>=8.3.0
19
+ Requires-Dist: docker>=7.0.0
19
20
  Requires-Dist: eclipse-zenoh>=1.5.0
20
- Requires-Dist: google-cloud-artifact-registry>=1.16.1
21
+ Requires-Dist: foxglove-sdk>=0.14.1
21
22
  Requires-Dist: httpx>=0.27.0
22
23
  Requires-Dist: loguru>=0.7.3
23
24
  Requires-Dist: msgpack==1.1.1
@@ -26,13 +27,11 @@ Requires-Dist: numpy==1.26.0
26
27
  Requires-Dist: ormsgpack>=1.6.0
27
28
  Requires-Dist: pydantic>=2.11.6
28
29
  Requires-Dist: pydantic>=2.11.7
29
- Requires-Dist: python-on-whales>=0.78.0
30
30
  Requires-Dist: pyyaml>=6.0.2
31
- Requires-Dist: requests>=2.32.0
32
31
  Requires-Dist: scipy==1.15.3
33
32
  Requires-Dist: sortedcontainers-stubs>=2.4.3
34
33
  Requires-Dist: sortedcontainers>=2.4.0
35
- Requires-Dist: tqdm>=4.67.1
34
+ Dynamic: license-file
36
35
 
37
36
  # antioch-py
38
37
 
@@ -78,9 +77,7 @@ ark = scene.add_ark(name="my_robot", version="0.1.0")
78
77
  task = Task()
79
78
  task.start(mcap_path="/tmp/recording.mcap")
80
79
 
81
- scene.play()
82
80
  scene.step(1_000_000) # step 1 second
83
- scene.pause()
84
81
 
85
82
  task.finish(outcome=TaskOutcome.SUCCESS)
86
83
  ```
@@ -0,0 +1,105 @@
1
+ # antioch-py
2
+
3
+ The Antioch Python Module SDK for building deterministic robotic modules.
4
+
5
+ ## Overview
6
+
7
+ `antioch-py` provides the Python client library for implementing Antioch modules - the core computational units that run inside Arks. Modules contain nodes that execute callbacks on a deterministic schedule, communicating via tokens.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pip install antioch-py
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```python
18
+ from antioch import Module, Execution
19
+
20
+ def my_callback(execution: Execution) -> None:
21
+ """Process inputs and produce outputs."""
22
+ # Read input data
23
+ input_data = execution.input("sensor_data")
24
+
25
+ # Process data
26
+ result = process(input_data)
27
+
28
+ # Write output
29
+ execution.output("processed", result)
30
+
31
+ # Create and run module
32
+ module = Module()
33
+ module.register("my_node", my_callback)
34
+ module.spin()
35
+ ```
36
+
37
+ ## Key Concepts
38
+
39
+ ### Module
40
+
41
+ The `Module` class is the main entry point for implementing Antioch modules. It handles:
42
+ - Configuration loading from environment (container mode) or explicit parameters (local mode)
43
+ - Node registration and lifecycle management
44
+ - Startup handshake and synchronization
45
+
46
+ ### Node
47
+
48
+ Nodes are the computational units within a module. Each node:
49
+ - Runs in its own thread
50
+ - Executes on a deterministic schedule
51
+ - Receives input tokens and produces output tokens
52
+
53
+ ### Execution
54
+
55
+ The `Execution` object is passed to node callbacks and provides:
56
+ - Access to input data via `input(name)`
57
+ - Output publishing via `output(name, data)`
58
+ - Hardware read/write for simulation mode
59
+ - Logging via `execution.logger`
60
+
61
+ ## Modes of Operation
62
+
63
+ ### Container Mode (Default)
64
+
65
+ When running inside an Ark pod, the module automatically loads configuration from environment variables:
66
+ - `_MODULE_NAME`: Module name
67
+ - `_ARK`: Ark configuration JSON
68
+ - `_ENVIRONMENT`: Execution environment (sim/real)
69
+ - `_DEBUG`: Debug mode flag
70
+
71
+ ### Local Mode
72
+
73
+ For testing and development, provide configuration explicitly:
74
+
75
+ ```python
76
+ from antioch import Module, Environment
77
+
78
+ module = Module(
79
+ module_name="my_module",
80
+ ark=my_ark_config,
81
+ environment=Environment.SIM,
82
+ debug=True,
83
+ )
84
+ ```
85
+
86
+ ## API Reference
87
+
88
+ ### Module
89
+
90
+ - `Module(module_name=None, ark=None, environment=Environment.REAL, debug=False)`: Create a module
91
+ - `register(name, callback)`: Register a node callback
92
+ - `spin()`: Start the module and wait for shutdown
93
+ - `join(timeout=None)`: Wait for all nodes to finish
94
+
95
+ ### Execution
96
+
97
+ - `input(name) -> list[Token]`: Get input tokens for an input
98
+ - `output(name, data)`: Set output data for an output
99
+ - `hardware_read(name) -> bytes`: Read hardware data (sim mode)
100
+ - `hardware_write(name, data)`: Write hardware data (sim mode)
101
+ - `logger`: Logger for telemetry and debugging
102
+
103
+ ## License
104
+
105
+ MIT
@@ -42,9 +42,7 @@ ark = scene.add_ark(name="my_robot", version="0.1.0")
42
42
  task = Task()
43
43
  task.start(mcap_path="/tmp/recording.mcap")
44
44
 
45
- scene.play()
46
45
  scene.step(1_000_000) # step 1 second
47
- scene.pause()
48
46
 
49
47
  task.finish(outcome=TaskOutcome.SUCCESS)
50
48
  ```
@@ -1,3 +1,10 @@
1
+ from antioch.clock import Clock
2
+ from antioch.execution import Execution
3
+ from antioch.input import NodeInputBuffer
4
+ from antioch.module import Module
5
+ from antioch.node import Node
6
+ from common.ark import Environment
7
+ from common.ark.token import Token, TokenType
1
8
  from common.message import (
2
9
  Array,
3
10
  Bool,
@@ -28,7 +35,6 @@ from common.message import (
28
35
  PointsAnnotationType,
29
36
  Pose,
30
37
  Quaternion,
31
- RadarDetection,
32
38
  RadarScan,
33
39
  SerializationError,
34
40
  String,
@@ -38,6 +44,15 @@ from common.message import (
38
44
  )
39
45
 
40
46
  __all__ = [
47
+ # Core
48
+ "Clock",
49
+ "Environment",
50
+ "Execution",
51
+ "Module",
52
+ "Node",
53
+ "NodeInputBuffer",
54
+ "Token",
55
+ "TokenType",
41
56
  # Base types
42
57
  "Message",
43
58
  "MessageError",
@@ -69,7 +84,6 @@ __all__ = [
69
84
  "JointTarget",
70
85
  "JointTargets",
71
86
  # Sensor types
72
- "RadarDetection",
73
87
  "RadarScan",
74
88
  "PointCloud",
75
89
  # Logging
@@ -1,9 +1,9 @@
1
1
  import time
2
2
  from typing import TypeVar, overload
3
3
 
4
- from antioch.module.token import Token, TokenType
5
4
  from common.ark.module import ModuleParameter
6
5
  from common.ark.node import NodeOutput
6
+ from common.ark.token import Token, TokenType
7
7
  from common.message import Image, ImuSample, JointStates, JointTargets, Message, PirStatus, RadarScan
8
8
  from common.utils.logger import Logger
9
9
  from common.utils.time import now_us
@@ -3,12 +3,10 @@ from threading import Lock
3
3
  import zenoh
4
4
  from sortedcontainers import SortedDict
5
5
 
6
- from antioch.module.token import Token, TokenType
7
6
  from common.ark.node import NodeInput
7
+ from common.ark.token import ARK_TOKEN_PATH, Token, TokenType
8
8
  from common.utils.comms import CommsSession
9
9
 
10
- TOKEN_INPUT_PATH = "_token/{path}"
11
-
12
10
 
13
11
  class NodeInputBuffer:
14
12
  """
@@ -33,7 +31,7 @@ class NodeInputBuffer:
33
31
  self._tokens: SortedDict[tuple[int, str, str], Token] = SortedDict()
34
32
 
35
33
  # Subscribe to token path with callback
36
- path = TOKEN_INPUT_PATH.format(path=config.path)
34
+ path = ARK_TOKEN_PATH.format(path=config.path)
37
35
  self._subscriber = comms.declare_callback_subscriber(path, self._on_token)
38
36
 
39
37
  def close(self) -> None:
@@ -4,35 +4,17 @@ import signal
4
4
  import threading
5
5
  from collections.abc import Callable
6
6
 
7
- from antioch.module.execution import Execution
8
- from antioch.module.node import Node
7
+ from antioch.execution import Execution
8
+ from antioch.node import Node
9
9
  from common.ark.ark import Ark, Environment
10
- from common.ark.module import ModuleParameter
11
- from common.message import Message
10
+ from common.ark.module import ModuleParameter, ModuleReady, ModuleStart
12
11
  from common.utils.comms import CommsSession
13
12
  from common.utils.logger import Logger
14
13
  from common.utils.time import now_us
15
14
 
16
- AGENT_MODULE_READY_PATH = "_agent/module_ready"
17
- AGENT_MODULE_START_PATH = "_agent/module_start"
18
-
19
-
20
- class ModuleReady(Message):
21
- """
22
- Module ready message sent during handshake.
23
- """
24
-
25
- _type = "antioch/agent/module_ready"
26
- module_name: str
27
-
28
-
29
- class ModuleStart(Message):
30
- """
31
- Module start message received during handshake.
32
- """
33
-
34
- _type = "antioch/agent/module_start"
35
- global_start_time_us: int
15
+ # Synchronization paths for module coordination
16
+ ARK_MODULE_READY_PATH = "_ark/module_ready"
17
+ ARK_MODULE_START_PATH = "_ark/module_start"
36
18
 
37
19
 
38
20
  class Module:
@@ -41,8 +23,8 @@ class Module:
41
23
  mode of operation:
42
24
 
43
25
  > Container Mode (default): The module runs inside a Kubernetes pod managed by the
44
- Antioch agent. Configuration is automatically loaded from environment variables
45
- set by the agent (_MODULE_NAME, _ARK, _ENVIRONMENT, _DEBUG).
26
+ Antioch runtime. Configuration is automatically loaded from environment variables
27
+ (_MODULE_NAME, _ARK, _ENVIRONMENT, _DEBUG).
46
28
 
47
29
  > Local Mode: The module runs standalone for testing and development. Configuration
48
30
  must be explicitly provided via constructor parameters (module_name, ark, environment,
@@ -53,8 +35,8 @@ class Module:
53
35
  before registering node callbacks.
54
36
 
55
37
  Users register node callbacks via register() and then call spin() to start execution.
56
- The Ark will not start until spin() is called, which begins the handshake with the
57
- agent and starts processing node callbacks.
38
+ The Ark will not start until spin() is called, which begins the synchronization
39
+ handshake and starts processing node callbacks.
58
40
 
59
41
  Example:
60
42
  # Container mode
@@ -142,8 +124,8 @@ class Module:
142
124
  """
143
125
 
144
126
  comms = CommsSession()
145
- logger = Logger(comms, self.module_name, debug=self.debug, print_logs=True)
146
- global_start_time_us = now_us() if self._is_local_mode else self._perform_agent_handshake(comms)
127
+ logger = Logger(base_channel=self.module_name, debug=self.debug, print_logs=True)
128
+ global_start_time_us = now_us() if self._is_local_mode else self._perform_startup_handshake(comms)
147
129
 
148
130
  # Validate node callbacks
149
131
  for node_name in self._node_callbacks:
@@ -174,6 +156,7 @@ class Module:
174
156
  self._shutdown_event.wait()
175
157
 
176
158
  logger.info("Module exiting")
159
+ logger.close()
177
160
  comms.close()
178
161
 
179
162
  def join(self, timeout: float | None = None) -> None:
@@ -190,9 +173,9 @@ class Module:
190
173
  for node in self._nodes.values():
191
174
  node.join(timeout=timeout)
192
175
 
193
- def _perform_agent_handshake(self, comms: CommsSession) -> int:
176
+ def _perform_startup_handshake(self, comms: CommsSession) -> int:
194
177
  """
195
- Perform handshake with agent to receive global start time.
178
+ Perform startup handshake to receive global start time.
196
179
 
197
180
  Publishes ready message and blocks waiting for start message containing
198
181
  the global start time for synchronization.
@@ -201,8 +184,8 @@ class Module:
201
184
  :return: Global start time in microseconds.
202
185
  """
203
186
 
204
- ready_publisher = comms.declare_publisher(AGENT_MODULE_READY_PATH)
205
- start_subscriber = comms.declare_subscriber(AGENT_MODULE_START_PATH)
187
+ ready_publisher = comms.declare_publisher(ARK_MODULE_READY_PATH)
188
+ start_subscriber = comms.declare_subscriber(ARK_MODULE_START_PATH)
206
189
  ready_publisher.publish(ModuleReady(module_name=self.module_name))
207
190
  start_msg = start_subscriber.recv(ModuleStart)
208
191
  return start_msg.global_start_time_us
@@ -2,22 +2,21 @@ import traceback
2
2
  from collections.abc import Callable
3
3
  from threading import Event, Thread
4
4
 
5
- from antioch.module.clock import Clock
6
- from antioch.module.execution import Execution
7
- from antioch.module.input import NodeInputBuffer
8
- from antioch.module.token import Token, TokenType
5
+ from antioch.clock import Clock
6
+ from antioch.execution import Execution
7
+ from antioch.input import NodeInputBuffer
9
8
  from common.ark.ark import Environment
10
9
  from common.ark.module import Module
11
- from common.ark.node import Node as NodeConfig
12
- from common.ark.scheduler import InputToken, NodeEdge, NodeStartEvent, OnlineScheduler
13
- from common.ark.sim import SimNodeComplete, SimNodeStart
10
+ from common.ark.node import Node as NodeConfig, NodeEdge, SimNodeComplete, SimNodeStart
11
+ from common.ark.scheduler import NodeStartEvent, OnlineScheduler
12
+ from common.ark.token import ARK_TOKEN_PATH, InputToken, Token, TokenType
14
13
  from common.utils.comms import CommsPublisher, CommsSession
15
14
  from common.utils.logger import Logger
16
15
  from common.utils.time import now_us
17
16
 
18
- TOKEN_OUTPUT_PATH = "_token/{path}"
19
- NODE_START_SUBSCRIBER_PATH = "_ark/node_start/{module}/{node}"
20
- NODE_COMPLETE_PUBLISHER_PATH = "_ark/node_complete/{module}/{node}"
17
+ # Synchronization paths for node coordination
18
+ ARK_NODE_START_PATH = "_ark/node_start/{module}/{node}"
19
+ ARK_NODE_COMPLETE_PATH = "_ark/node_complete/{module}/{node}"
21
20
 
22
21
 
23
22
  class Node:
@@ -67,8 +66,8 @@ class Node:
67
66
  self._callback = callback
68
67
 
69
68
  self._comms = CommsSession()
70
- self._logger = Logger(self._comms, module_name, debug=debug, print_logs=True)
71
- self._execution_logger = Logger(self._comms, module_name, debug=debug, print_logs=True)
69
+ self._logger = Logger(base_channel=module_name, debug=debug, print_logs=True)
70
+ self._execution_logger = Logger(base_channel=module_name, debug=debug, print_logs=True)
72
71
  self._shutdown_requested = Event()
73
72
 
74
73
  # Create input buffers for all inputs
@@ -79,7 +78,7 @@ class Node:
79
78
  # Create output publishers for all outputs
80
79
  self._output_publishers: dict[str, CommsPublisher] = {}
81
80
  for output_name, output_config in node_config.outputs.items():
82
- path = TOKEN_OUTPUT_PATH.format(path=output_config.path)
81
+ path = ARK_TOKEN_PATH.format(path=output_config.path)
83
82
  self._output_publishers[output_name] = self._comms.declare_publisher(path)
84
83
 
85
84
  # Create reusable execution context
@@ -115,7 +114,9 @@ class Node:
115
114
  for publisher in self._output_publishers.values():
116
115
  publisher.close()
117
116
 
118
- # Close comms session
117
+ # Close loggers and comms session
118
+ self._logger.close()
119
+ self._execution_logger.close()
119
120
  self._comms.close()
120
121
 
121
122
  def join(self, timeout: float | None = None) -> None:
@@ -135,8 +136,8 @@ class Node:
135
136
  for shutdown events.
136
137
  """
137
138
 
138
- start_path = NODE_START_SUBSCRIBER_PATH.format(module=self._module_name, node=self._node_name)
139
- complete_path = NODE_COMPLETE_PUBLISHER_PATH.format(module=self._module_name, node=self._node_name)
139
+ start_path = ARK_NODE_START_PATH.format(module=self._module_name, node=self._node_name)
140
+ complete_path = ARK_NODE_COMPLETE_PATH.format(module=self._module_name, node=self._node_name)
140
141
  start_subscriber = self._comms.declare_async_subscriber(start_path)
141
142
  complete_publisher = self._comms.declare_publisher(complete_path)
142
143
 
@@ -1,23 +1,24 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: antioch-py
3
- Version: 2.2.3
4
- Summary: The Antioch Python SDK
3
+ Version: 3.0.0
4
+ Summary: Antioch Python Module SDK
5
5
  Author-email: Antioch Robotics <support@antioch.dev>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://antioch.com
8
- Keywords: robotics,simulation,middleware,sdk
8
+ Keywords: robotics,simulation,middleware,sdk,modules
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Intended Audience :: Developers
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
14
14
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
- Requires-Python: <3.13,>=3.12
15
+ Requires-Python: <3.13,>=3.10
16
16
  Description-Content-Type: text/markdown
17
+ License-File: LICENSE
17
18
  Requires-Dist: click>=8.0.0
18
- Requires-Dist: click>=8.3.0
19
+ Requires-Dist: docker>=7.0.0
19
20
  Requires-Dist: eclipse-zenoh>=1.5.0
20
- Requires-Dist: google-cloud-artifact-registry>=1.16.1
21
+ Requires-Dist: foxglove-sdk>=0.14.1
21
22
  Requires-Dist: httpx>=0.27.0
22
23
  Requires-Dist: loguru>=0.7.3
23
24
  Requires-Dist: msgpack==1.1.1
@@ -26,13 +27,11 @@ Requires-Dist: numpy==1.26.0
26
27
  Requires-Dist: ormsgpack>=1.6.0
27
28
  Requires-Dist: pydantic>=2.11.6
28
29
  Requires-Dist: pydantic>=2.11.7
29
- Requires-Dist: python-on-whales>=0.78.0
30
30
  Requires-Dist: pyyaml>=6.0.2
31
- Requires-Dist: requests>=2.32.0
32
31
  Requires-Dist: scipy==1.15.3
33
32
  Requires-Dist: sortedcontainers-stubs>=2.4.3
34
33
  Requires-Dist: sortedcontainers>=2.4.0
35
- Requires-Dist: tqdm>=4.67.1
34
+ Dynamic: license-file
36
35
 
37
36
  # antioch-py
38
37
 
@@ -78,9 +77,7 @@ ark = scene.add_ark(name="my_robot", version="0.1.0")
78
77
  task = Task()
79
78
  task.start(mcap_path="/tmp/recording.mcap")
80
79
 
81
- scene.play()
82
80
  scene.step(1_000_000) # step 1 second
83
- scene.pause()
84
81
 
85
82
  task.finish(outcome=TaskOutcome.SUCCESS)
86
83
  ```
@@ -0,0 +1,66 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ README.pypi.md
5
+ pyproject.toml
6
+ antioch/__init__.py
7
+ antioch/clock.py
8
+ antioch/execution.py
9
+ antioch/input.py
10
+ antioch/module.py
11
+ antioch/node.py
12
+ antioch_py.egg-info/PKG-INFO
13
+ antioch_py.egg-info/SOURCES.txt
14
+ antioch_py.egg-info/dependency_links.txt
15
+ antioch_py.egg-info/requires.txt
16
+ antioch_py.egg-info/top_level.txt
17
+ common/__init__.py
18
+ common/constants.py
19
+ common/ark/__init__.py
20
+ common/ark/ark.py
21
+ common/ark/hardware.py
22
+ common/ark/kinematics.py
23
+ common/ark/module.py
24
+ common/ark/node.py
25
+ common/ark/scheduler.py
26
+ common/ark/sim.py
27
+ common/ark/token.py
28
+ common/assets/__init__.py
29
+ common/assets/rigging.usd
30
+ common/core/__init__.py
31
+ common/core/auth.py
32
+ common/core/container.py
33
+ common/core/registry.py
34
+ common/core/rome.py
35
+ common/core/telemetry.py
36
+ common/core/types.py
37
+ common/message/__init__.py
38
+ common/message/annotation.py
39
+ common/message/array.py
40
+ common/message/camera.py
41
+ common/message/color.py
42
+ common/message/detection.py
43
+ common/message/foxglove.py
44
+ common/message/frame.py
45
+ common/message/image.py
46
+ common/message/imu.py
47
+ common/message/joint.py
48
+ common/message/log.py
49
+ common/message/message.py
50
+ common/message/pir.py
51
+ common/message/plot.py
52
+ common/message/point.py
53
+ common/message/point_cloud.py
54
+ common/message/pose.py
55
+ common/message/quaternion.py
56
+ common/message/radar.py
57
+ common/message/twist.py
58
+ common/message/types.py
59
+ common/message/vector.py
60
+ common/sim/__init__.py
61
+ common/sim/objects.py
62
+ common/sim/state.py
63
+ common/utils/__init__.py
64
+ common/utils/comms.py
65
+ common/utils/logger.py
66
+ common/utils/time.py
@@ -1,7 +1,7 @@
1
1
  click>=8.0.0
2
- click>=8.3.0
2
+ docker>=7.0.0
3
3
  eclipse-zenoh>=1.5.0
4
- google-cloud-artifact-registry>=1.16.1
4
+ foxglove-sdk>=0.14.1
5
5
  httpx>=0.27.0
6
6
  loguru>=0.7.3
7
7
  msgpack==1.1.1
@@ -10,10 +10,7 @@ numpy==1.26.0
10
10
  ormsgpack>=1.6.0
11
11
  pydantic>=2.11.6
12
12
  pydantic>=2.11.7
13
- python-on-whales>=0.78.0
14
13
  pyyaml>=6.0.2
15
- requests>=2.32.0
16
14
  scipy==1.15.3
17
15
  sortedcontainers-stubs>=2.4.3
18
16
  sortedcontainers>=2.4.0
19
- tqdm>=4.67.1
@@ -1,29 +1,16 @@
1
- from common.ark.ark import (
2
- Ark,
3
- ArkInfo,
4
- ArkMetadata,
5
- ArkReference,
6
- ArkVersionReference,
7
- AssetReference,
8
- AssetVersionReference,
9
- Environment,
10
- Kinematics,
11
- )
1
+ from common.ark.ark import Ark, ArkInfo, ArkMetadata, Environment, Kinematics
12
2
  from common.ark.hardware import CameraHardware, Hardware, HardwareType, ImuHardware, PirHardware, RadarHardware
13
3
  from common.ark.kinematics import Joint, Link
14
4
  from common.ark.module import Module, ModuleImage, ModuleInfo, ModuleKind, ModuleParameter, ParamType
15
5
  from common.ark.node import HardwareAccessMode, Node, NodeInput, NodeOutput, NodeTimer
16
- from common.ark.scheduler import InputToken, NodeCompleteEvent, NodeEdge, NodeStartEvent, NodeState, OnlineScheduler, ScheduleEvent
6
+ from common.ark.scheduler import NodeCompleteEvent, NodeEdge, NodeStartEvent, NodeState, OnlineScheduler, ScheduleEvent
7
+ from common.ark.token import InputToken, Token, TokenType
17
8
 
18
9
  __all__ = [
19
10
  # Core Ark types
20
11
  "Ark",
21
12
  "ArkInfo",
22
13
  "ArkMetadata",
23
- "AssetReference",
24
- "AssetVersionReference",
25
- "ArkReference",
26
- "ArkVersionReference",
27
14
  "Environment",
28
15
  "Kinematics",
29
16
  # Module types
@@ -57,4 +44,7 @@ __all__ = [
57
44
  "ScheduleEvent",
58
45
  "NodeState",
59
46
  "OnlineScheduler",
47
+ # Token types
48
+ "Token",
49
+ "TokenType",
60
50
  ]