dropbear 0.1.0a1__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 (62) hide show
  1. dropbear-0.1.0a1/.gitignore +71 -0
  2. dropbear-0.1.0a1/LICENSE +176 -0
  3. dropbear-0.1.0a1/PKG-INFO +223 -0
  4. dropbear-0.1.0a1/README.md +186 -0
  5. dropbear-0.1.0a1/dropbear/__init__.py +41 -0
  6. dropbear-0.1.0a1/dropbear/arm.py +431 -0
  7. dropbear-0.1.0a1/dropbear/assets/__init__.py +0 -0
  8. dropbear-0.1.0a1/dropbear/assets/camera_reference.jpg +0 -0
  9. dropbear-0.1.0a1/dropbear/assets/camera_reference.svg +82 -0
  10. dropbear-0.1.0a1/dropbear/bench.py +236 -0
  11. dropbear-0.1.0a1/dropbear/calibrate.py +52 -0
  12. dropbear-0.1.0a1/dropbear/cli.py +320 -0
  13. dropbear-0.1.0a1/dropbear/config.py +116 -0
  14. dropbear-0.1.0a1/dropbear/constants.py +78 -0
  15. dropbear-0.1.0a1/dropbear/control.py +233 -0
  16. dropbear-0.1.0a1/dropbear/demo.py +66 -0
  17. dropbear-0.1.0a1/dropbear/doctor.py +385 -0
  18. dropbear-0.1.0a1/dropbear/errors.py +316 -0
  19. dropbear-0.1.0a1/dropbear/franka.py +105 -0
  20. dropbear-0.1.0a1/dropbear/hardware/__init__.py +0 -0
  21. dropbear-0.1.0a1/dropbear/hardware/cameras.py +41 -0
  22. dropbear-0.1.0a1/dropbear/hardware/fake.py +64 -0
  23. dropbear-0.1.0a1/dropbear/hardware/lerobot_so101.py +122 -0
  24. dropbear-0.1.0a1/dropbear/hardware/ports.py +39 -0
  25. dropbear-0.1.0a1/dropbear/hardware/protocols.py +28 -0
  26. dropbear-0.1.0a1/dropbear/libero.py +67 -0
  27. dropbear-0.1.0a1/dropbear/motion/__init__.py +0 -0
  28. dropbear-0.1.0a1/dropbear/motion/ensemble.py +91 -0
  29. dropbear-0.1.0a1/dropbear/motion/loop.py +258 -0
  30. dropbear-0.1.0a1/dropbear/motion/safety.py +112 -0
  31. dropbear-0.1.0a1/dropbear/optional.py +15 -0
  32. dropbear-0.1.0a1/dropbear/policy/__init__.py +50 -0
  33. dropbear-0.1.0a1/dropbear/policy/config.py +176 -0
  34. dropbear-0.1.0a1/dropbear/policy/lifecycle.py +552 -0
  35. dropbear-0.1.0a1/dropbear/policy/remote.py +1202 -0
  36. dropbear-0.1.0a1/dropbear/policy/run_loop.py +1187 -0
  37. dropbear-0.1.0a1/dropbear/policy/runtime/__init__.py +1 -0
  38. dropbear-0.1.0a1/dropbear/policy/runtime/action_buffer.py +251 -0
  39. dropbear-0.1.0a1/dropbear/policy/runtime/calibration.py +489 -0
  40. dropbear-0.1.0a1/dropbear/policy/runtime/contract.py +126 -0
  41. dropbear-0.1.0a1/dropbear/policy/runtime/control.py +393 -0
  42. dropbear-0.1.0a1/dropbear/policy/runtime/rtc.py +774 -0
  43. dropbear-0.1.0a1/dropbear/policy/types.py +169 -0
  44. dropbear-0.1.0a1/dropbear/quickstart.py +397 -0
  45. dropbear-0.1.0a1/dropbear/region_probe.py +187 -0
  46. dropbear-0.1.0a1/dropbear/sessions.py +242 -0
  47. dropbear-0.1.0a1/dropbear/sessions_cmd.py +130 -0
  48. dropbear-0.1.0a1/dropbear/sim/__init__.py +0 -0
  49. dropbear-0.1.0a1/dropbear/sim/artifacts.py +88 -0
  50. dropbear-0.1.0a1/dropbear/sim/metrics.py +336 -0
  51. dropbear-0.1.0a1/dropbear/sim/runtime.py +401 -0
  52. dropbear-0.1.0a1/dropbear/sim/sim_arm.py +1392 -0
  53. dropbear-0.1.0a1/dropbear/sim/timing.py +100 -0
  54. dropbear-0.1.0a1/dropbear/so101.py +79 -0
  55. dropbear-0.1.0a1/dropbear/state.py +93 -0
  56. dropbear-0.1.0a1/dropbear/status.py +168 -0
  57. dropbear-0.1.0a1/dropbear/terminal.py +351 -0
  58. dropbear-0.1.0a1/dropbear/transport_selection.py +141 -0
  59. dropbear-0.1.0a1/dropbear/wire.py +179 -0
  60. dropbear-0.1.0a1/examples/franka_inference.py +27 -0
  61. dropbear-0.1.0a1/examples/libero_rollout.py +51 -0
  62. dropbear-0.1.0a1/pyproject.toml +92 -0
@@ -0,0 +1,71 @@
1
+ # macOS
2
+ .DS_Store
3
+
4
+ # Python
5
+ __pycache__/
6
+ *.py[cod]
7
+ .pytest_cache/
8
+ .mypy_cache/
9
+ .ruff_cache/
10
+ .coverage
11
+ htmlcov/
12
+
13
+ # Local caches (e.g. lerobot dataset + smoke-test artifacts)
14
+ .cache/
15
+
16
+ # Virtual environments
17
+ .venv/
18
+ venv/
19
+
20
+ # Build and packaging output
21
+ build/
22
+ dist/
23
+ *.egg-info/
24
+
25
+ # Local environment files
26
+ .env
27
+ .env.*
28
+ !.env.example
29
+
30
+ # Logs
31
+ *.log
32
+
33
+ # Experiment note assets and generated analysis payloads
34
+ sandbox/experiments/*/notes/assets/
35
+
36
+ # Local scratch/checkouts
37
+ tmp/
38
+ .worktrees/
39
+ .codex/*
40
+ !.codex/skills/
41
+ !.codex/skills/**
42
+
43
+ # Root cleanup holding area for generated/non-product artifacts moved out of
44
+ # the repository root.
45
+ sandbox/.root-artifacts/
46
+
47
+ # Phase 0 traces and generated infra state (now under sandbox/)
48
+ sandbox/traces/*.jsonl
49
+ sandbox/traces/*.csv
50
+ sandbox/traces/*.parquet
51
+ sandbox/traces/mtr/
52
+ sandbox/experiments/*/runs/**/mtr-*.txt
53
+ sandbox/experiments/*/runs/**/qlog/
54
+ sandbox/infra/terraform/.terraform/
55
+ # .terraform.lock.hcl is intentionally committed so the whole team pins identical
56
+ # provider versions. State now lives in S3 (see sandbox/infra/terraform/backend.tf);
57
+ # the local tfstate files below are stale artifacts and stay ignored.
58
+ sandbox/infra/terraform/terraform.tfstate
59
+ sandbox/infra/terraform/terraform.tfstate.backup
60
+ sandbox/infra/terraform/tfplan
61
+ sandbox/infra/certs/
62
+
63
+ # Local model checkpoints
64
+ sandbox/policies/flash/molmoact2-so101/MolmoAct2-SO100_101/
65
+ .gstack/
66
+
67
+ # Cold-start benchmark run outputs (raw per-iteration meta/ssm dumps + combined.json).
68
+ # Commit a baseline report.md by hand if you want to keep it; runs/ is ephemeral.
69
+ mvp/benchmarks/runs/
70
+ mvp/e2e/runs/
71
+ sandbox/benchmarks/runs/
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the
13
+ copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other
16
+ entities that control, are controlled by, or are under common control with
17
+ that entity. For the purposes of this definition, "control" means (i) the
18
+ power, direct or indirect, to cause the direction or management of such
19
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent
20
+ (50%) or more of the outstanding shares, or (iii) beneficial ownership of
21
+ such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
24
+ permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation source, and
28
+ configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical transformation
31
+ or translation of a Source form, including but not limited to compiled object
32
+ code, generated documentation, and conversions to other media types.
33
+
34
+ "Work" shall mean the work of authorship, whether in Source or Object form,
35
+ made available under the License, as indicated by a copyright notice that is
36
+ included in or attached to the work (an example is provided in the Appendix
37
+ below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object form,
40
+ that is based on (or derived from) the Work and for which the editorial
41
+ revisions, annotations, elaborations, or other modifications represent, as a
42
+ whole, an original work of authorship. For the purposes of this License,
43
+ Derivative Works shall not include works that remain separable from, or
44
+ merely link (or bind by name) to the interfaces of, the Work and Derivative
45
+ Works thereof.
46
+
47
+ "Contribution" shall mean any work of authorship, including the original
48
+ version of the Work and any modifications or additions to that Work or
49
+ Derivative Works thereof, that is intentionally submitted to Licensor for
50
+ inclusion in the Work by the copyright owner or by an individual or Legal
51
+ Entity authorized to submit on behalf of the copyright owner. For the
52
+ purposes of this definition, "submitted" means any form of electronic,
53
+ verbal, or written communication sent to the Licensor or its representatives,
54
+ including but not limited to communication on electronic mailing lists,
55
+ source code control systems, and issue tracking systems that are managed by,
56
+ or on behalf of, the Licensor for the purpose of discussing and improving the
57
+ Work, but excluding communication that is conspicuously marked or otherwise
58
+ designated in writing by the copyright owner as "Not a Contribution."
59
+
60
+ "Contributor" shall mean Licensor and any individual or Legal Entity on
61
+ behalf of whom a Contribution has been received by Licensor and subsequently
62
+ incorporated within the Work.
63
+
64
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
65
+ License, each Contributor hereby grants to You a perpetual, worldwide,
66
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
67
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
68
+ sublicense, and distribute the Work and such Derivative Works in Source or
69
+ Object form.
70
+
71
+ 3. Grant of Patent License. Subject to the terms and conditions of this
72
+ License, each Contributor hereby grants to You a perpetual, worldwide,
73
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
74
+ section) patent license to make, have made, use, offer to sell, sell, import,
75
+ and otherwise transfer the Work, where such license applies only to those
76
+ patent claims licensable by such Contributor that are necessarily infringed
77
+ by their Contribution(s) alone or by combination of their Contribution(s)
78
+ with the Work to which such Contribution(s) was submitted. If You institute
79
+ patent litigation against any entity (including a cross-claim or counterclaim
80
+ in a lawsuit) alleging that the Work or a Contribution incorporated within
81
+ the Work constitutes direct or contributory patent infringement, then any
82
+ patent licenses granted to You under this License for that Work shall
83
+ terminate as of the date such litigation is filed.
84
+
85
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
86
+ Derivative Works thereof in any medium, with or without modifications, and in
87
+ Source or Object form, provided that You meet the following conditions:
88
+
89
+ (a) You must give any other recipients of the Work or Derivative Works a copy
90
+ of this License; and
91
+
92
+ (b) You must cause any modified files to carry prominent notices stating that
93
+ You changed the files; and
94
+
95
+ (c) You must retain, in the Source form of any Derivative Works that You
96
+ distribute, all copyright, patent, trademark, and attribution notices from the
97
+ Source form of the Work, excluding those notices that do not pertain to any
98
+ part of the Derivative Works; and
99
+
100
+ (d) If the Work includes a "NOTICE" text file as part of its distribution,
101
+ then any Derivative Works that You distribute must include a readable copy of
102
+ the attribution notices contained within such NOTICE file, excluding those
103
+ notices that do not pertain to any part of the Derivative Works, in at least
104
+ one of the following places: within a NOTICE text file distributed as part of
105
+ the Derivative Works; within the Source form or documentation, if provided
106
+ along with the Derivative Works; or, within a display generated by the
107
+ Derivative Works, if and wherever such third-party notices normally appear.
108
+ The contents of the NOTICE file are for informational purposes only and do
109
+ not modify the License. You may add Your own attribution notices within
110
+ Derivative Works that You distribute, alongside or as an addendum to the
111
+ NOTICE text from the Work, provided that such additional attribution notices
112
+ cannot be construed as modifying the License.
113
+
114
+ You may add Your own copyright statement to Your modifications and may
115
+ provide additional or different license terms and conditions for use,
116
+ reproduction, or distribution of Your modifications, or for any such
117
+ Derivative Works as a whole, provided Your use, reproduction, and distribution
118
+ of the Work otherwise complies with the conditions stated in this License.
119
+
120
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
121
+ Contribution intentionally submitted for inclusion in the Work by You to the
122
+ Licensor shall be under the terms and conditions of this License, without any
123
+ additional terms or conditions. Notwithstanding the above, nothing herein
124
+ shall supersede or modify the terms of any separate license agreement you may
125
+ have executed with Licensor regarding such Contributions.
126
+
127
+ 6. Trademarks. This License does not grant permission to use the trade names,
128
+ trademarks, service marks, or product names of the Licensor, except as
129
+ required for reasonable and customary use in describing the origin of the
130
+ Work and reproducing the content of the NOTICE file.
131
+
132
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
133
+ writing, Licensor provides the Work (and each Contributor provides its
134
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
135
+ KIND, either express or implied, including, without limitation, any warranties
136
+ or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
137
+ PARTICULAR PURPOSE. You are solely responsible for determining the
138
+ appropriateness of using or redistributing the Work and assume any risks
139
+ associated with Your exercise of permissions under this License.
140
+
141
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
142
+ tort (including negligence), contract, or otherwise, unless required by
143
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
144
+ writing, shall any Contributor be liable to You for damages, including any
145
+ direct, indirect, special, incidental, or consequential damages of any
146
+ character arising as a result of this License or out of the use or inability
147
+ to use the Work (including but not limited to damages for loss of goodwill,
148
+ work stoppage, computer failure or malfunction, or any and all other
149
+ commercial damages or losses), even if such Contributor has been advised of
150
+ the possibility of such damages.
151
+
152
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work
153
+ or Derivative Works thereof, You may choose to offer, and charge a fee for,
154
+ acceptance of support, warranty, indemnity, or other liability obligations
155
+ and/or rights consistent with this License. However, in accepting such
156
+ obligations, You may act only on Your own behalf and on Your sole
157
+ responsibility, not on behalf of any other Contributor, and only if You agree
158
+ to indemnify, defend, and hold each Contributor harmless for any liability
159
+ incurred by, or claims asserted against, such Contributor by reason of your
160
+ accepting any such warranty or additional liability.
161
+
162
+ END OF TERMS AND CONDITIONS
163
+
164
+ Copyright 2026 Dreamscale Labs
165
+
166
+ Licensed under the Apache License, Version 2.0 (the "License");
167
+ you may not use this file except in compliance with the License.
168
+ You may obtain a copy of the License at
169
+
170
+ http://www.apache.org/licenses/LICENSE-2.0
171
+
172
+ Unless required by applicable law or agreed to in writing, software
173
+ distributed under the License is distributed on an "AS IS" BASIS,
174
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
175
+ See the License for the specific language governing permissions and
176
+ limitations under the License.
@@ -0,0 +1,223 @@
1
+ Metadata-Version: 2.4
2
+ Name: dropbear
3
+ Version: 0.1.0a1
4
+ Summary: Cloud robot policy inference — one function call.
5
+ Project-URL: Homepage, https://dropbear.dreamscalelabs.com
6
+ Project-URL: Documentation, https://dropbear.dreamscalelabs.com/docs
7
+ Author: Dreamscale Labs
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Keywords: inference,physical-ai,robotics,vla
11
+ Classifier: Development Status :: 2 - Pre-Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Requires-Python: <3.13,>=3.12
17
+ Requires-Dist: dropbear-transport==0.1.1a1
18
+ Requires-Dist: httpx<1,>=0.27
19
+ Requires-Dist: numpy<2.3,>=2.0
20
+ Requires-Dist: pillow<12,>=10
21
+ Requires-Dist: rich<14,>=13.9
22
+ Requires-Dist: tomli-w<2,>=1.0
23
+ Requires-Dist: typer<1,>=0.12
24
+ Provides-Extra: sim
25
+ Requires-Dist: bddl==1.0.1; extra == 'sim'
26
+ Requires-Dist: easydict<2,>=1.13; extra == 'sim'
27
+ Requires-Dist: future<2,>=1; extra == 'sim'
28
+ Requires-Dist: imageio<3,>=2.36; extra == 'sim'
29
+ Requires-Dist: matplotlib<4,>=3.9; extra == 'sim'
30
+ Requires-Dist: mujoco<4,>=3.2; extra == 'sim'
31
+ Requires-Dist: opencv-python<5,>=4.10; extra == 'sim'
32
+ Requires-Dist: pyyaml<7,>=6; extra == 'sim'
33
+ Requires-Dist: robosuite==1.4.1; extra == 'sim'
34
+ Provides-Extra: so101
35
+ Requires-Dist: lerobot[feetech]==0.5.1; extra == 'so101'
36
+ Description-Content-Type: text/markdown
37
+
38
+ # Dropbear
39
+
40
+ Cloud robot policy inference — one function call.
41
+
42
+ > `0.1.0a1` is a pre-alpha release. Pin the exact version while the public API
43
+ > is still evolving.
44
+
45
+ ## Install
46
+
47
+ Add Dropbear to a Python 3.12 project:
48
+
49
+ ```bash
50
+ uv add "dropbear==0.1.0a1"
51
+ ```
52
+
53
+ Install the CLI as a standalone tool:
54
+
55
+ ```bash
56
+ uv tool install "dropbear==0.1.0a1"
57
+ dropbear login
58
+ ```
59
+
60
+ The base package contains cloud inference, transport, model contracts, and
61
+ robot-neutral observation helpers. Install a hardware or simulator stack only
62
+ when you need it:
63
+
64
+ ```bash
65
+ uv add "dropbear[so101]==0.1.0a1"
66
+ uv add "dropbear[sim]==0.1.0a1"
67
+ ```
68
+
69
+ The `sim` extra is currently Linux/WSL2 only because of upstream
70
+ LIBERO/robosuite limitations.
71
+
72
+ ## Cloud policy inference
73
+
74
+ ```python
75
+ import dropbear
76
+
77
+ policy = dropbear.connect() # defaults to molmoact2-so101
78
+ policy.run(
79
+ instruction="pick up the cube",
80
+ observe=observe,
81
+ act=act,
82
+ max_actions=300,
83
+ )
84
+ ```
85
+
86
+ `dropbear.connect()` is the canonical SDK entrypoint.
87
+ `connect_so101()` is a deprecated compatibility path for the legacy physical
88
+ SO-101 safety loop and will be removed after that behavior is folded into the
89
+ generic policy surface. New cloud-policy work should use `dropbear.connect()`.
90
+ There is no first-class public `connect_libero()` or `connect_franka()`
91
+ entrypoint; use `dropbear.connect(model="molmoact2-libero")` or select another
92
+ checkpoint with `model=`.
93
+
94
+ Use a context manager so every cloud session closes deterministically:
95
+
96
+ ```python
97
+ import dropbear
98
+
99
+ with dropbear.connect(model="molmoact2-libero") as policy:
100
+ result = policy.run(
101
+ instruction="put the mug on the plate",
102
+ observe=observe,
103
+ act=act,
104
+ max_actions=220,
105
+ strategy=dropbear.RunStrategy.libero_default(),
106
+ )
107
+ ```
108
+
109
+ `region="nearest"` is the default. `region="available"` may fall back to
110
+ another supported region when the nearest region has no capacity. Passing an
111
+ AWS region pins the session there.
112
+
113
+ `transport="auto"` tries QUIC first and can use the hosted relay;
114
+ `transport="quic"` requires QUIC, and `transport="relay"` uses the relay
115
+ directly.
116
+
117
+ ## MolmoAct2-DROID on Franka
118
+
119
+ MolmoAct2-DROID consumes an exterior RGB view and wrist RGB view. A second
120
+ exterior view is optional; when omitted, Dropbear reuses the first exterior
121
+ frame for the checkpoint's second exterior slot.
122
+
123
+ Robot state is seven Franka joint positions in radians followed by a gripper
124
+ value in `[0, 1]`.
125
+
126
+ ```python
127
+ import numpy as np
128
+ import dropbear
129
+
130
+ exterior_rgb = np.zeros((480, 640, 3), dtype=np.uint8)
131
+ wrist_rgb = np.zeros((480, 640, 3), dtype=np.uint8)
132
+
133
+ observation = dropbear.franka.observe(
134
+ exterior_frame=exterior_rgb,
135
+ wrist_frame=wrist_rgb,
136
+ joint_positions=[0.0] * 7,
137
+ gripper=0.5, # 0=open, 1=closed
138
+ )
139
+
140
+ with dropbear.connect(model="molmoact2-droid") as policy:
141
+ result = policy.predict(
142
+ observation,
143
+ instruction="pick up the green block",
144
+ )
145
+
146
+ assert len(result.actions) == 15
147
+ assert all(len(action) == 8 for action in result.actions)
148
+ ```
149
+
150
+ The checkpoint returns a 15-step chunk at 15 Hz. Each action is an absolute
151
+ target `[joint_0, ..., joint_6, gripper]`; joints are radians and the gripper is
152
+ in `[0, 1]`.
153
+
154
+ `predict()` does not actuate hardware or provide a Franka safety controller.
155
+ Validate joint, velocity, acceleration, workspace, collision, and gripper
156
+ limits before sending any target to a robot.
157
+
158
+ ## Manual action loop
159
+
160
+ For a caller-owned control loop, pass the task instruction to
161
+ `policy.next_action(...)`. Dropbear owns inference, refill, action buffering,
162
+ calibration, and RTC prefix context; the caller owns sensing, actuation, and
163
+ loop cadence.
164
+
165
+ ```python
166
+ import time
167
+
168
+ dt = 1.0 / policy.action_hz
169
+ while running:
170
+ tick = time.perf_counter()
171
+ action = policy.next_action(
172
+ observe(),
173
+ instruction="put the mug on the plate",
174
+ )
175
+ robot.execute(action)
176
+ time.sleep(max(0.0, dt - (time.perf_counter() - tick)))
177
+ ```
178
+
179
+ ## CLI
180
+
181
+ Sign in once. Credentials are stored in `~/.dropbear/config.toml`.
182
+
183
+ ```bash
184
+ dropbear login
185
+ dropbear status
186
+ ```
187
+
188
+ For non-interactive setup, pass an API key or use bare `--api-key` to paste it
189
+ into a hidden prompt:
190
+
191
+ ```bash
192
+ dropbear login --api-key dropbear_sk_...
193
+ dropbear login --api-key
194
+ ```
195
+
196
+ Run robot-neutral setup checks:
197
+
198
+ ```bash
199
+ dropbear doctor
200
+ ```
201
+
202
+ SO-101 and simulation checks are explicit:
203
+
204
+ ```bash
205
+ dropbear doctor so101
206
+ dropbear doctor sim
207
+ ```
208
+
209
+ Install shell completion with:
210
+
211
+ ```bash
212
+ dropbear --install-completion
213
+ ```
214
+
215
+ Useful session commands:
216
+
217
+ ```bash
218
+ dropbear sessions list
219
+ dropbear sessions stop <session-id>
220
+ dropbear sessions stop --all
221
+ ```
222
+
223
+ Documentation: https://dropbear.dreamscalelabs.com/docs
@@ -0,0 +1,186 @@
1
+ # Dropbear
2
+
3
+ Cloud robot policy inference — one function call.
4
+
5
+ > `0.1.0a1` is a pre-alpha release. Pin the exact version while the public API
6
+ > is still evolving.
7
+
8
+ ## Install
9
+
10
+ Add Dropbear to a Python 3.12 project:
11
+
12
+ ```bash
13
+ uv add "dropbear==0.1.0a1"
14
+ ```
15
+
16
+ Install the CLI as a standalone tool:
17
+
18
+ ```bash
19
+ uv tool install "dropbear==0.1.0a1"
20
+ dropbear login
21
+ ```
22
+
23
+ The base package contains cloud inference, transport, model contracts, and
24
+ robot-neutral observation helpers. Install a hardware or simulator stack only
25
+ when you need it:
26
+
27
+ ```bash
28
+ uv add "dropbear[so101]==0.1.0a1"
29
+ uv add "dropbear[sim]==0.1.0a1"
30
+ ```
31
+
32
+ The `sim` extra is currently Linux/WSL2 only because of upstream
33
+ LIBERO/robosuite limitations.
34
+
35
+ ## Cloud policy inference
36
+
37
+ ```python
38
+ import dropbear
39
+
40
+ policy = dropbear.connect() # defaults to molmoact2-so101
41
+ policy.run(
42
+ instruction="pick up the cube",
43
+ observe=observe,
44
+ act=act,
45
+ max_actions=300,
46
+ )
47
+ ```
48
+
49
+ `dropbear.connect()` is the canonical SDK entrypoint.
50
+ `connect_so101()` is a deprecated compatibility path for the legacy physical
51
+ SO-101 safety loop and will be removed after that behavior is folded into the
52
+ generic policy surface. New cloud-policy work should use `dropbear.connect()`.
53
+ There is no first-class public `connect_libero()` or `connect_franka()`
54
+ entrypoint; use `dropbear.connect(model="molmoact2-libero")` or select another
55
+ checkpoint with `model=`.
56
+
57
+ Use a context manager so every cloud session closes deterministically:
58
+
59
+ ```python
60
+ import dropbear
61
+
62
+ with dropbear.connect(model="molmoact2-libero") as policy:
63
+ result = policy.run(
64
+ instruction="put the mug on the plate",
65
+ observe=observe,
66
+ act=act,
67
+ max_actions=220,
68
+ strategy=dropbear.RunStrategy.libero_default(),
69
+ )
70
+ ```
71
+
72
+ `region="nearest"` is the default. `region="available"` may fall back to
73
+ another supported region when the nearest region has no capacity. Passing an
74
+ AWS region pins the session there.
75
+
76
+ `transport="auto"` tries QUIC first and can use the hosted relay;
77
+ `transport="quic"` requires QUIC, and `transport="relay"` uses the relay
78
+ directly.
79
+
80
+ ## MolmoAct2-DROID on Franka
81
+
82
+ MolmoAct2-DROID consumes an exterior RGB view and wrist RGB view. A second
83
+ exterior view is optional; when omitted, Dropbear reuses the first exterior
84
+ frame for the checkpoint's second exterior slot.
85
+
86
+ Robot state is seven Franka joint positions in radians followed by a gripper
87
+ value in `[0, 1]`.
88
+
89
+ ```python
90
+ import numpy as np
91
+ import dropbear
92
+
93
+ exterior_rgb = np.zeros((480, 640, 3), dtype=np.uint8)
94
+ wrist_rgb = np.zeros((480, 640, 3), dtype=np.uint8)
95
+
96
+ observation = dropbear.franka.observe(
97
+ exterior_frame=exterior_rgb,
98
+ wrist_frame=wrist_rgb,
99
+ joint_positions=[0.0] * 7,
100
+ gripper=0.5, # 0=open, 1=closed
101
+ )
102
+
103
+ with dropbear.connect(model="molmoact2-droid") as policy:
104
+ result = policy.predict(
105
+ observation,
106
+ instruction="pick up the green block",
107
+ )
108
+
109
+ assert len(result.actions) == 15
110
+ assert all(len(action) == 8 for action in result.actions)
111
+ ```
112
+
113
+ The checkpoint returns a 15-step chunk at 15 Hz. Each action is an absolute
114
+ target `[joint_0, ..., joint_6, gripper]`; joints are radians and the gripper is
115
+ in `[0, 1]`.
116
+
117
+ `predict()` does not actuate hardware or provide a Franka safety controller.
118
+ Validate joint, velocity, acceleration, workspace, collision, and gripper
119
+ limits before sending any target to a robot.
120
+
121
+ ## Manual action loop
122
+
123
+ For a caller-owned control loop, pass the task instruction to
124
+ `policy.next_action(...)`. Dropbear owns inference, refill, action buffering,
125
+ calibration, and RTC prefix context; the caller owns sensing, actuation, and
126
+ loop cadence.
127
+
128
+ ```python
129
+ import time
130
+
131
+ dt = 1.0 / policy.action_hz
132
+ while running:
133
+ tick = time.perf_counter()
134
+ action = policy.next_action(
135
+ observe(),
136
+ instruction="put the mug on the plate",
137
+ )
138
+ robot.execute(action)
139
+ time.sleep(max(0.0, dt - (time.perf_counter() - tick)))
140
+ ```
141
+
142
+ ## CLI
143
+
144
+ Sign in once. Credentials are stored in `~/.dropbear/config.toml`.
145
+
146
+ ```bash
147
+ dropbear login
148
+ dropbear status
149
+ ```
150
+
151
+ For non-interactive setup, pass an API key or use bare `--api-key` to paste it
152
+ into a hidden prompt:
153
+
154
+ ```bash
155
+ dropbear login --api-key dropbear_sk_...
156
+ dropbear login --api-key
157
+ ```
158
+
159
+ Run robot-neutral setup checks:
160
+
161
+ ```bash
162
+ dropbear doctor
163
+ ```
164
+
165
+ SO-101 and simulation checks are explicit:
166
+
167
+ ```bash
168
+ dropbear doctor so101
169
+ dropbear doctor sim
170
+ ```
171
+
172
+ Install shell completion with:
173
+
174
+ ```bash
175
+ dropbear --install-completion
176
+ ```
177
+
178
+ Useful session commands:
179
+
180
+ ```bash
181
+ dropbear sessions list
182
+ dropbear sessions stop <session-id>
183
+ dropbear sessions stop --all
184
+ ```
185
+
186
+ Documentation: https://dropbear.dreamscalelabs.com/docs
@@ -0,0 +1,41 @@
1
+ """Dropbear - fast serverless inference for your robots."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from importlib.metadata import PackageNotFoundError, version
6
+ from typing import TYPE_CHECKING
7
+
8
+ try:
9
+ __version__ = version("dropbear")
10
+ except PackageNotFoundError: # Direct source import outside an installed environment.
11
+ __version__ = "0+unknown"
12
+
13
+ from dropbear import franka, libero, so101
14
+ from dropbear.policy import RegionPreference, RunHooks, RunStrategy, aconnect, connect
15
+
16
+ if TYPE_CHECKING:
17
+ from dropbear.arm import Arm
18
+
19
+
20
+ def connect_so101(*, region: RegionPreference = "nearest") -> Arm:
21
+ """Connect to the legacy physical SO-101 control path.
22
+
23
+ Prefer dropbear.connect(model="molmoact2-so101", ...) for new cloud-policy work.
24
+ """
25
+ from dropbear.arm import connect_so101 as _connect
26
+
27
+ return _connect(region=region)
28
+
29
+
30
+ __all__ = [
31
+ "RunHooks",
32
+ "RunStrategy",
33
+ "RegionPreference",
34
+ "aconnect",
35
+ "connect",
36
+ "connect_so101",
37
+ "franka",
38
+ "libero",
39
+ "so101",
40
+ "__version__",
41
+ ]