creature-lab 0.3.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.
Files changed (182) hide show
  1. creature_lab/__init__.py +18 -0
  2. creature_lab/agents/__init__.py +5 -0
  3. creature_lab/agents/baseline.py +53 -0
  4. creature_lab/agents/llm.py +33 -0
  5. creature_lab/agents/loop.py +112 -0
  6. creature_lab/agents/prompts.py +63 -0
  7. creature_lab/agents/tools.py +101 -0
  8. creature_lab/autopsy.py +376 -0
  9. creature_lab/backends/__init__.py +1 -0
  10. creature_lab/backends/base.py +25 -0
  11. creature_lab/backends/mujoco_backend.py +253 -0
  12. creature_lab/backends/pybullet_backend.py +573 -0
  13. creature_lab/cli.py +3317 -0
  14. creature_lab/controllers/__init__.py +1 -0
  15. creature_lab/controllers/cpg.py +83 -0
  16. creature_lab/controllers/factory.py +208 -0
  17. creature_lab/controllers/pid.py +33 -0
  18. creature_lab/controllers/policy.py +91 -0
  19. creature_lab/controllers/pose_seq.py +38 -0
  20. creature_lab/controllers/posture.py +125 -0
  21. creature_lab/controllers/sinusoid.py +20 -0
  22. creature_lab/controllers/target_seek.py +128 -0
  23. creature_lab/diagnosis.py +435 -0
  24. creature_lab/diagnostics.py +261 -0
  25. creature_lab/editor/__init__.py +5 -0
  26. creature_lab/editor/controls.py +2495 -0
  27. creature_lab/editor/history.py +85 -0
  28. creature_lab/editor/jobs.py +176 -0
  29. creature_lab/editor/labels.py +91 -0
  30. creature_lab/editor/live.py +672 -0
  31. creature_lab/editor/playback.py +98 -0
  32. creature_lab/editor/presets.py +282 -0
  33. creature_lab/editor/robot_panel.py +288 -0
  34. creature_lab/editor/robot_stage.py +181 -0
  35. creature_lab/editor/session.py +1413 -0
  36. creature_lab/env.py +274 -0
  37. creature_lab/evolve.py +394 -0
  38. creature_lab/export/__init__.py +9 -0
  39. creature_lab/export/mjcf.py +199 -0
  40. creature_lab/export/urdf.py +152 -0
  41. creature_lab/export/urdf_import.py +142 -0
  42. creature_lab/exporting.py +360 -0
  43. creature_lab/failure_zoo.py +98 -0
  44. creature_lab/hashing.py +19 -0
  45. creature_lab/io_utils.py +37 -0
  46. creature_lab/library.py +311 -0
  47. creature_lab/qualification.py +299 -0
  48. creature_lab/reports.py +428 -0
  49. creature_lab/reports_html.py +549 -0
  50. creature_lab/rl/__init__.py +9 -0
  51. creature_lab/rl/gym_env.py +74 -0
  52. creature_lab/rl/train.py +148 -0
  53. creature_lab/robots/__init__.py +6 -0
  54. creature_lab/robots/actuator.py +115 -0
  55. creature_lab/robots/analysis.py +282 -0
  56. creature_lab/robots/api.py +30 -0
  57. creature_lab/robots/card.py +182 -0
  58. creature_lab/robots/catalog.py +153 -0
  59. creature_lab/robots/checkup.py +216 -0
  60. creature_lab/robots/cli.py +275 -0
  61. creature_lab/robots/compare.py +229 -0
  62. creature_lab/robots/data/UNITREE_RL_GYM_LICENSE.txt +23 -0
  63. creature_lab/robots/data/microduck.json +253 -0
  64. creature_lab/robots/data/unitree_g1.json +174 -0
  65. creature_lab/robots/data/unitree_g1_policy.npz +0 -0
  66. creature_lab/robots/fetch.py +115 -0
  67. creature_lab/robots/film.py +78 -0
  68. creature_lab/robots/g1.py +103 -0
  69. creature_lab/robots/microduck.py +153 -0
  70. creature_lab/robots/overlay.py +384 -0
  71. creature_lab/robots/policies.py +81 -0
  72. creature_lab/robots/render.py +236 -0
  73. creature_lab/robots/report.py +307 -0
  74. creature_lab/robots/rollout.py +185 -0
  75. creature_lab/robots/scene.py +53 -0
  76. creature_lab/robots/story.py +485 -0
  77. creature_lab/robots/types.py +120 -0
  78. creature_lab/robots/video.py +277 -0
  79. creature_lab/robots/visual.py +41 -0
  80. creature_lab/robustness.py +165 -0
  81. creature_lab/runs.py +242 -0
  82. creature_lab/scaffold/__init__.py +29 -0
  83. creature_lab/scaffold/humanoid.py +227 -0
  84. creature_lab/scaffold/legged.py +144 -0
  85. creature_lab/scaffold/mirror.py +90 -0
  86. creature_lab/scaffold/worm.py +80 -0
  87. creature_lab/schema/__init__.py +79 -0
  88. creature_lab/schema/agent.py +28 -0
  89. creature_lab/schema/base.py +33 -0
  90. creature_lab/schema/control.py +49 -0
  91. creature_lab/schema/controller.py +208 -0
  92. creature_lab/schema/creature.py +235 -0
  93. creature_lab/schema/summary.py +30 -0
  94. creature_lab/schema/task.py +137 -0
  95. creature_lab/schema/trace.py +110 -0
  96. creature_lab/scoring.py +56 -0
  97. creature_lab/terrain.py +172 -0
  98. creature_lab/validation.py +103 -0
  99. creature_lab/viewers/__init__.py +1 -0
  100. creature_lab/viewers/overlays.py +71 -0
  101. creature_lab/viewers/plotting.py +43 -0
  102. creature_lab/viewers/video_exporter.py +26 -0
  103. creature_lab/viewers/viser_viewer.py +489 -0
  104. creature_lab/web/__init__.py +6 -0
  105. creature_lab/web/builder.py +91 -0
  106. creature_lab/web/creatures.py +445 -0
  107. creature_lab/web/jobs.py +172 -0
  108. creature_lab/web/library.py +254 -0
  109. creature_lab/web/scene.py +112 -0
  110. creature_lab/web/server.py +394 -0
  111. creature_lab/web/static/assets/index-CVJ_iiu_.css +1 -0
  112. creature_lab/web/static/assets/index-D-2y8anQ.js +4233 -0
  113. creature_lab/web/static/clips/unitree_g1.webp +0 -0
  114. creature_lab/web/static/index.html +16 -0
  115. creature_lab/web/thumbs.py +120 -0
  116. creature_lab/web/whatif.py +149 -0
  117. creature_lab/zoo/damaged_quadruped/baselines/recover.json +14 -0
  118. creature_lab/zoo/damaged_quadruped/baselines/recover.mujoco.json +14 -0
  119. creature_lab/zoo/damaged_quadruped/creature.json +205 -0
  120. creature_lab/zoo/damaged_quadruped/tasks/recover.json +8 -0
  121. creature_lab/zoo/hexapod/baselines/crawl_forward.json +14 -0
  122. creature_lab/zoo/hexapod/baselines/crawl_forward.mujoco.json +14 -0
  123. creature_lab/zoo/hexapod/controller.json +42 -0
  124. creature_lab/zoo/hexapod/creature.json +295 -0
  125. creature_lab/zoo/hexapod/tasks/crawl_forward.json +7 -0
  126. creature_lab/zoo/humanoid_12dof/baselines/reach.json +14 -0
  127. creature_lab/zoo/humanoid_12dof/baselines/reach.mujoco.json +14 -0
  128. creature_lab/zoo/humanoid_12dof/baselines/walk.json +14 -0
  129. creature_lab/zoo/humanoid_12dof/baselines/walk.mujoco.json +14 -0
  130. creature_lab/zoo/humanoid_12dof/controller.json +18 -0
  131. creature_lab/zoo/humanoid_12dof/creature.json +628 -0
  132. creature_lab/zoo/humanoid_12dof/tasks/reach.json +8 -0
  133. creature_lab/zoo/humanoid_12dof/tasks/walk.json +7 -0
  134. creature_lab/zoo/humanoid_minimal/baselines/balance.json +14 -0
  135. creature_lab/zoo/humanoid_minimal/baselines/balance.mujoco.json +14 -0
  136. creature_lab/zoo/humanoid_minimal/baselines/push_recovery.json +14 -0
  137. creature_lab/zoo/humanoid_minimal/baselines/push_recovery.mujoco.json +14 -0
  138. creature_lab/zoo/humanoid_minimal/baselines/walk.json +14 -0
  139. creature_lab/zoo/humanoid_minimal/baselines/walk.mujoco.json +14 -0
  140. creature_lab/zoo/humanoid_minimal/creature.json +434 -0
  141. creature_lab/zoo/humanoid_minimal/tasks/balance.json +7 -0
  142. creature_lab/zoo/humanoid_minimal/tasks/push_recovery.json +8 -0
  143. creature_lab/zoo/humanoid_minimal/tasks/walk.json +7 -0
  144. creature_lab/zoo/quadruped/baselines/crawl_forward.json +14 -0
  145. creature_lab/zoo/quadruped/baselines/crawl_forward.mujoco.json +14 -0
  146. creature_lab/zoo/quadruped/baselines/gap_cross.json +14 -0
  147. creature_lab/zoo/quadruped/baselines/gap_cross.mujoco.json +14 -0
  148. creature_lab/zoo/quadruped/baselines/low_friction_crawl.mujoco.json +14 -0
  149. creature_lab/zoo/quadruped/baselines/push_recovery.mujoco.json +14 -0
  150. creature_lab/zoo/quadruped/baselines/reach_target.json +14 -0
  151. creature_lab/zoo/quadruped/baselines/reach_target.mujoco.json +14 -0
  152. creature_lab/zoo/quadruped/baselines/slope_climb.json +14 -0
  153. creature_lab/zoo/quadruped/baselines/slope_climb.mujoco.json +14 -0
  154. creature_lab/zoo/quadruped/baselines/stability_hold.mujoco.json +14 -0
  155. creature_lab/zoo/quadruped/baselines/step_over.json +14 -0
  156. creature_lab/zoo/quadruped/baselines/step_over.mujoco.json +14 -0
  157. creature_lab/zoo/quadruped/controller.json +30 -0
  158. creature_lab/zoo/quadruped/creature.json +205 -0
  159. creature_lab/zoo/quadruped/tasks/crawl_forward.json +7 -0
  160. creature_lab/zoo/quadruped/tasks/gap_cross.json +7 -0
  161. creature_lab/zoo/quadruped/tasks/low_friction_crawl.json +7 -0
  162. creature_lab/zoo/quadruped/tasks/push_recovery.json +8 -0
  163. creature_lab/zoo/quadruped/tasks/reach_target.json +8 -0
  164. creature_lab/zoo/quadruped/tasks/slope_climb.json +7 -0
  165. creature_lab/zoo/quadruped/tasks/stability_hold.json +7 -0
  166. creature_lab/zoo/quadruped/tasks/step_over.json +7 -0
  167. creature_lab/zoo/tripod/baselines/crawl_forward.json +14 -0
  168. creature_lab/zoo/tripod/baselines/crawl_forward.mujoco.json +14 -0
  169. creature_lab/zoo/tripod/controller.json +24 -0
  170. creature_lab/zoo/tripod/creature.json +145 -0
  171. creature_lab/zoo/tripod/tasks/crawl_forward.json +7 -0
  172. creature_lab/zoo/worm/baselines/crawl_forward.json +14 -0
  173. creature_lab/zoo/worm/baselines/crawl_forward.mujoco.json +14 -0
  174. creature_lab/zoo/worm/controller.json +36 -0
  175. creature_lab/zoo/worm/creature.json +247 -0
  176. creature_lab/zoo/worm/tasks/crawl_forward.json +7 -0
  177. creature_lab/zoo.py +171 -0
  178. creature_lab-0.3.0.dist-info/METADATA +370 -0
  179. creature_lab-0.3.0.dist-info/RECORD +182 -0
  180. creature_lab-0.3.0.dist-info/WHEEL +4 -0
  181. creature_lab-0.3.0.dist-info/entry_points.txt +2 -0
  182. creature_lab-0.3.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,295 @@
1
+ {
2
+ "name": "hexapod",
3
+ "parts": [
4
+ {
5
+ "id": "torso",
6
+ "shape": "box",
7
+ "mass": 1.0,
8
+ "color": [
9
+ 0.2,
10
+ 0.55,
11
+ 0.9
12
+ ],
13
+ "size": [
14
+ 0.6,
15
+ 0.3,
16
+ 0.08
17
+ ]
18
+ },
19
+ {
20
+ "id": "leg_0l",
21
+ "shape": "capsule",
22
+ "mass": 0.15,
23
+ "color": [
24
+ 0.3,
25
+ 0.7,
26
+ 0.95
27
+ ],
28
+ "radius": 0.028,
29
+ "length": 0.2
30
+ },
31
+ {
32
+ "id": "leg_0r",
33
+ "shape": "capsule",
34
+ "mass": 0.15,
35
+ "color": [
36
+ 0.25,
37
+ 0.6,
38
+ 0.9
39
+ ],
40
+ "radius": 0.028,
41
+ "length": 0.2
42
+ },
43
+ {
44
+ "id": "leg_1l",
45
+ "shape": "capsule",
46
+ "mass": 0.15,
47
+ "color": [
48
+ 0.3,
49
+ 0.7,
50
+ 0.95
51
+ ],
52
+ "radius": 0.028,
53
+ "length": 0.2
54
+ },
55
+ {
56
+ "id": "leg_1r",
57
+ "shape": "capsule",
58
+ "mass": 0.15,
59
+ "color": [
60
+ 0.25,
61
+ 0.6,
62
+ 0.9
63
+ ],
64
+ "radius": 0.028,
65
+ "length": 0.2
66
+ },
67
+ {
68
+ "id": "leg_2l",
69
+ "shape": "capsule",
70
+ "mass": 0.15,
71
+ "color": [
72
+ 0.3,
73
+ 0.7,
74
+ 0.95
75
+ ],
76
+ "radius": 0.028,
77
+ "length": 0.2
78
+ },
79
+ {
80
+ "id": "leg_2r",
81
+ "shape": "capsule",
82
+ "mass": 0.15,
83
+ "color": [
84
+ 0.25,
85
+ 0.6,
86
+ 0.9
87
+ ],
88
+ "radius": 0.028,
89
+ "length": 0.2
90
+ }
91
+ ],
92
+ "joints": [
93
+ {
94
+ "id": "hip_0l",
95
+ "parent": "torso",
96
+ "child": "leg_0l",
97
+ "type": "hinge",
98
+ "anchor": [
99
+ 0.24,
100
+ 0.15,
101
+ -0.04
102
+ ],
103
+ "axis": [
104
+ 0.0,
105
+ 1.0,
106
+ 0.0
107
+ ],
108
+ "rest_orientation": [
109
+ 0.9537169507482269,
110
+ 0.0,
111
+ -0.3007057995042731,
112
+ 0.0
113
+ ],
114
+ "limit": [
115
+ -1.2,
116
+ 1.2
117
+ ]
118
+ },
119
+ {
120
+ "id": "hip_0r",
121
+ "parent": "torso",
122
+ "child": "leg_0r",
123
+ "type": "hinge",
124
+ "anchor": [
125
+ 0.24,
126
+ -0.15,
127
+ -0.04
128
+ ],
129
+ "axis": [
130
+ 0.0,
131
+ 1.0,
132
+ 0.0
133
+ ],
134
+ "rest_orientation": [
135
+ 0.9537169507482269,
136
+ 0.0,
137
+ -0.3007057995042731,
138
+ 0.0
139
+ ],
140
+ "limit": [
141
+ -1.2,
142
+ 1.2
143
+ ]
144
+ },
145
+ {
146
+ "id": "hip_1l",
147
+ "parent": "torso",
148
+ "child": "leg_1l",
149
+ "type": "hinge",
150
+ "anchor": [
151
+ 0.0,
152
+ 0.15,
153
+ -0.04
154
+ ],
155
+ "axis": [
156
+ 0.0,
157
+ 1.0,
158
+ 0.0
159
+ ],
160
+ "rest_orientation": [
161
+ 0.9537169507482269,
162
+ 0.0,
163
+ -0.3007057995042731,
164
+ 0.0
165
+ ],
166
+ "limit": [
167
+ -1.2,
168
+ 1.2
169
+ ]
170
+ },
171
+ {
172
+ "id": "hip_1r",
173
+ "parent": "torso",
174
+ "child": "leg_1r",
175
+ "type": "hinge",
176
+ "anchor": [
177
+ 0.0,
178
+ -0.15,
179
+ -0.04
180
+ ],
181
+ "axis": [
182
+ 0.0,
183
+ 1.0,
184
+ 0.0
185
+ ],
186
+ "rest_orientation": [
187
+ 0.9537169507482269,
188
+ 0.0,
189
+ -0.3007057995042731,
190
+ 0.0
191
+ ],
192
+ "limit": [
193
+ -1.2,
194
+ 1.2
195
+ ]
196
+ },
197
+ {
198
+ "id": "hip_2l",
199
+ "parent": "torso",
200
+ "child": "leg_2l",
201
+ "type": "hinge",
202
+ "anchor": [
203
+ -0.24,
204
+ 0.15,
205
+ -0.04
206
+ ],
207
+ "axis": [
208
+ 0.0,
209
+ 1.0,
210
+ 0.0
211
+ ],
212
+ "rest_orientation": [
213
+ 0.9537169507482269,
214
+ 0.0,
215
+ -0.3007057995042731,
216
+ 0.0
217
+ ],
218
+ "limit": [
219
+ -1.2,
220
+ 1.2
221
+ ]
222
+ },
223
+ {
224
+ "id": "hip_2r",
225
+ "parent": "torso",
226
+ "child": "leg_2r",
227
+ "type": "hinge",
228
+ "anchor": [
229
+ -0.24,
230
+ -0.15,
231
+ -0.04
232
+ ],
233
+ "axis": [
234
+ 0.0,
235
+ 1.0,
236
+ 0.0
237
+ ],
238
+ "rest_orientation": [
239
+ 0.9537169507482269,
240
+ 0.0,
241
+ -0.3007057995042731,
242
+ 0.0
243
+ ],
244
+ "limit": [
245
+ -1.2,
246
+ 1.2
247
+ ]
248
+ }
249
+ ],
250
+ "motors": [
251
+ {
252
+ "joint": "hip_0l",
253
+ "type": "sinusoid",
254
+ "amplitude": 0.7,
255
+ "frequency": 2.0,
256
+ "phase": 0.0
257
+ },
258
+ {
259
+ "joint": "hip_0r",
260
+ "type": "sinusoid",
261
+ "amplitude": 0.7,
262
+ "frequency": 2.0,
263
+ "phase": 3.141592653589793
264
+ },
265
+ {
266
+ "joint": "hip_1l",
267
+ "type": "sinusoid",
268
+ "amplitude": 0.7,
269
+ "frequency": 2.0,
270
+ "phase": 0.0
271
+ },
272
+ {
273
+ "joint": "hip_1r",
274
+ "type": "sinusoid",
275
+ "amplitude": 0.7,
276
+ "frequency": 2.0,
277
+ "phase": 3.141592653589793
278
+ },
279
+ {
280
+ "joint": "hip_2l",
281
+ "type": "sinusoid",
282
+ "amplitude": 0.7,
283
+ "frequency": 2.0,
284
+ "phase": 0.0
285
+ },
286
+ {
287
+ "joint": "hip_2r",
288
+ "type": "sinusoid",
289
+ "amplitude": 0.7,
290
+ "frequency": 2.0,
291
+ "phase": 3.141592653589793
292
+ }
293
+ ],
294
+ "metadata": {}
295
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "crawl_forward",
3
+ "duration": 5.0,
4
+ "timestep": 0.016666666666666666,
5
+ "terrain": {"type": "plane", "friction": 1.0},
6
+ "reward": {"forward_distance": 1.0}
7
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "creature": "humanoid_12dof",
3
+ "task": "reach",
4
+ "backend": "pybullet api 202010061",
5
+ "best_score": -0.722300896,
6
+ "score_summary": {
7
+ "forward": 0.0,
8
+ "target": -0.6432648,
9
+ "energy": -0.079036096,
10
+ "fall": -0.0,
11
+ "total": -0.722300896
12
+ },
13
+ "note": "open-loop sinusoid baseline; untuned humanoid"
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "creature": "humanoid_12dof",
3
+ "task": "reach",
4
+ "backend": "mujoco 3.10.0",
5
+ "best_score": -0.055215691,
6
+ "score_summary": {
7
+ "forward": -0.0,
8
+ "target": -0.049835441,
9
+ "energy": -0.00538025,
10
+ "fall": 0.0,
11
+ "total": -0.055215691
12
+ },
13
+ "note": "open-loop sinusoid controller baseline (MuJoCo backend)"
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "creature": "humanoid_12dof",
3
+ "task": "walk",
4
+ "backend": "pybullet api 202010061",
5
+ "best_score": -0.44664397,
6
+ "score_summary": {
7
+ "forward": 0.05335603,
8
+ "target": 0.0,
9
+ "energy": -0.0,
10
+ "fall": -0.5,
11
+ "total": -0.44664397
12
+ },
13
+ "note": "open-loop sinusoid baseline; untuned humanoid"
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "creature": "humanoid_12dof",
3
+ "task": "walk",
4
+ "backend": "mujoco 3.10.0",
5
+ "best_score": -0.0,
6
+ "score_summary": {
7
+ "forward": -0.0,
8
+ "target": 0.0,
9
+ "energy": -0.0,
10
+ "fall": 0.0,
11
+ "total": -0.0
12
+ },
13
+ "note": "open-loop sinusoid controller baseline (MuJoCo backend)"
14
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "humanoid_walk_optimized",
3
+ "type": "sinusoid",
4
+ "motors": [
5
+ {"joint": "hip_l", "amplitude": 0.06175983, "frequency": 0.59366193, "phase": -0.14953295, "offset": -0.26559449},
6
+ {"joint": "knee_l", "amplitude": 0.13486493, "frequency": 0.59366193, "phase": 1.57425437, "offset": -0.18859700},
7
+ {"joint": "ankle_l", "amplitude": 0.04803215, "frequency": 0.59366193, "phase": 3.08204705, "offset": 0.08743940},
8
+ {"joint": "shoulder_l", "amplitude": 0.19256411, "frequency": 0.59366193, "phase": 3.43399273, "offset": 0.0},
9
+ {"joint": "elbow_l", "amplitude": 0.0, "frequency": 0.59366193, "phase": 0.0, "offset": 0.0},
10
+ {"joint": "wrist_l", "amplitude": 0.0, "frequency": 0.59366193, "phase": 0.0, "offset": 0.0},
11
+ {"joint": "hip_r", "amplitude": 0.06175983, "frequency": 0.59366193, "phase": 2.99205970, "offset": -0.26559449},
12
+ {"joint": "knee_r", "amplitude": 0.13486493, "frequency": 0.59366193, "phase": 4.71584702, "offset": -0.18859700},
13
+ {"joint": "ankle_r", "amplitude": 0.04803215, "frequency": 0.59366193, "phase": 6.22363970, "offset": 0.08743940},
14
+ {"joint": "shoulder_r", "amplitude": 0.19256411, "frequency": 0.59366193, "phase": 0.29240008, "offset": 0.0},
15
+ {"joint": "elbow_r", "amplitude": 0.0, "frequency": 0.59366193, "phase": 0.0, "offset": 0.0},
16
+ {"joint": "wrist_r", "amplitude": 0.0, "frequency": 0.59366193, "phase": 0.0, "offset": 0.0}
17
+ ]
18
+ }