imt-ring 1.6.19__tar.gz → 1.6.21__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. {imt_ring-1.6.19 → imt_ring-1.6.21}/PKG-INFO +9 -1
  2. {imt_ring-1.6.19 → imt_ring-1.6.21}/pyproject.toml +1 -1
  3. {imt_ring-1.6.19 → imt_ring-1.6.21}/readme.md +8 -0
  4. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/imt_ring.egg-info/PKG-INFO +9 -1
  5. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/_random.py +1 -1
  6. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/generator/base.py +10 -0
  7. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/generator/finalize_fns.py +12 -0
  8. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/ml/optimizer.py +5 -1
  9. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/ml/train.py +4 -6
  10. {imt_ring-1.6.19 → imt_ring-1.6.21}/setup.cfg +0 -0
  11. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/imt_ring.egg-info/SOURCES.txt +0 -0
  12. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/imt_ring.egg-info/dependency_links.txt +0 -0
  13. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/imt_ring.egg-info/requires.txt +0 -0
  14. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/imt_ring.egg-info/top_level.txt +0 -0
  15. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/__init__.py +0 -0
  16. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algebra.py +0 -0
  17. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/__init__.py +0 -0
  18. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/custom_joints/__init__.py +0 -0
  19. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/custom_joints/rr_imp_joint.py +0 -0
  20. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/custom_joints/rr_joint.py +0 -0
  21. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/custom_joints/rsaddle_joint.py +0 -0
  22. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/custom_joints/suntay.py +0 -0
  23. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/dynamics.py +0 -0
  24. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/generator/__init__.py +0 -0
  25. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/generator/batch.py +0 -0
  26. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/generator/motion_artifacts.py +0 -0
  27. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/generator/pd_control.py +0 -0
  28. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/generator/setup_fns.py +0 -0
  29. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/generator/types.py +0 -0
  30. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/jcalc.py +0 -0
  31. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/kinematics.py +0 -0
  32. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/algorithms/sensors.py +0 -0
  33. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/base.py +0 -0
  34. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/__init__.py +0 -0
  35. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/branched.xml +0 -0
  36. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/exclude/knee_trans_dof.xml +0 -0
  37. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/exclude/standard_sys.xml +0 -0
  38. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/exclude/standard_sys_rr_imp.xml +0 -0
  39. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/inv_pendulum.xml +0 -0
  40. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/knee_flexible_imus.xml +0 -0
  41. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/spherical_stiff.xml +0 -0
  42. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/symmetric.xml +0 -0
  43. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_all_1.xml +0 -0
  44. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_all_2.xml +0 -0
  45. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_ang0_pos0.xml +0 -0
  46. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_control.xml +0 -0
  47. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_double_pendulum.xml +0 -0
  48. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_free.xml +0 -0
  49. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_kinematics.xml +0 -0
  50. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_morph_system/four_seg_seg1.xml +0 -0
  51. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_morph_system/four_seg_seg3.xml +0 -0
  52. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_randomize_position.xml +0 -0
  53. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_sensors.xml +0 -0
  54. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples/test_three_seg_seg2.xml +0 -0
  55. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/examples.py +0 -0
  56. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/test_examples.py +0 -0
  57. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/xml/__init__.py +0 -0
  58. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/xml/abstract.py +0 -0
  59. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/xml/from_xml.py +0 -0
  60. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/xml/test_from_xml.py +0 -0
  61. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/xml/test_to_xml.py +0 -0
  62. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/io/xml/to_xml.py +0 -0
  63. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/maths.py +0 -0
  64. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/ml/__init__.py +0 -0
  65. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/ml/base.py +0 -0
  66. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/ml/callbacks.py +0 -0
  67. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/ml/ml_utils.py +0 -0
  68. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/ml/params/0x13e3518065c21cd8.pickle +0 -0
  69. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/ml/params/0x1d76628065a71e0f.pickle +0 -0
  70. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/ml/ringnet.py +0 -0
  71. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/ml/rnno_v1.py +0 -0
  72. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/ml/training_loop.py +0 -0
  73. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/rendering/__init__.py +0 -0
  74. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/rendering/base_render.py +0 -0
  75. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/rendering/mujoco_render.py +0 -0
  76. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/rendering/vispy_render.py +0 -0
  77. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/rendering/vispy_visuals.py +0 -0
  78. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/sim2real/__init__.py +0 -0
  79. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/sim2real/sim2real.py +0 -0
  80. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/spatial.py +0 -0
  81. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/sys_composer/__init__.py +0 -0
  82. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/sys_composer/delete_sys.py +0 -0
  83. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/sys_composer/inject_sys.py +0 -0
  84. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/sys_composer/morph_sys.py +0 -0
  85. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/__init__.py +0 -0
  86. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/backend.py +0 -0
  87. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/batchsize.py +0 -0
  88. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/colab.py +0 -0
  89. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/dataloader.py +0 -0
  90. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/dataloader_torch.py +0 -0
  91. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/hdf5.py +0 -0
  92. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/normalizer.py +0 -0
  93. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/path.py +0 -0
  94. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/randomize_sys.py +0 -0
  95. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/register_gym_envs/__init__.py +0 -0
  96. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/register_gym_envs/saddle.py +0 -0
  97. {imt_ring-1.6.19 → imt_ring-1.6.21}/src/ring/utils/utils.py +0 -0
  98. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_algebra.py +0 -0
  99. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_base.py +0 -0
  100. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_custom_joints.py +0 -0
  101. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_dynamics.py +0 -0
  102. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_generator.py +0 -0
  103. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_jcalc.py +0 -0
  104. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_jit.py +0 -0
  105. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_kinematics.py +0 -0
  106. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_maths.py +0 -0
  107. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_ml_utils.py +0 -0
  108. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_motion_artifacts.py +0 -0
  109. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_pd_control.py +0 -0
  110. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_quickstart_example.py +0 -0
  111. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_random.py +0 -0
  112. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_randomize.py +0 -0
  113. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_rcmg.py +0 -0
  114. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_render.py +0 -0
  115. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_sensors.py +0 -0
  116. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_sim2real.py +0 -0
  117. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_sys_composer.py +0 -0
  118. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_train.py +0 -0
  119. {imt_ring-1.6.19 → imt_ring-1.6.21}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: imt-ring
3
- Version: 1.6.19
3
+ Version: 1.6.21
4
4
  Summary: RING: Recurrent Inertial Graph-based Estimator
5
5
  Author-email: Simon Bachhuber <simon.bachhuber@fau.de>
6
6
  Project-URL: Homepage, https://github.com/SimiPixel/ring
@@ -98,6 +98,14 @@ import os
98
98
  os.environ["MUJOCO_GL"] = "egl"
99
99
  ```
100
100
 
101
+ #### Windows-related: ImportError: DLL load failed while importing ...
102
+
103
+ > ImportError: DLL load failed while importing _multiarray_umath: Das angegebene Modul wurde nicht gefunden.
104
+
105
+ Solution:
106
+ 1. `pip uninstall -y jax jaxlib`
107
+ 2. `conda install -c conda-forge jax`
108
+
101
109
  ## Publications
102
110
 
103
111
  The following publications utilize this software library, and refer to it as the *Random Chain Motion Generator (RCMG)* (more specifically the function `ring.RCMG`):
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "imt-ring"
7
- version = "1.6.19"
7
+ version = "1.6.21"
8
8
  authors = [
9
9
  { name="Simon Bachhuber", email="simon.bachhuber@fau.de" },
10
10
  ]
@@ -65,6 +65,14 @@ import os
65
65
  os.environ["MUJOCO_GL"] = "egl"
66
66
  ```
67
67
 
68
+ #### Windows-related: ImportError: DLL load failed while importing ...
69
+
70
+ > ImportError: DLL load failed while importing _multiarray_umath: Das angegebene Modul wurde nicht gefunden.
71
+
72
+ Solution:
73
+ 1. `pip uninstall -y jax jaxlib`
74
+ 2. `conda install -c conda-forge jax`
75
+
68
76
  ## Publications
69
77
 
70
78
  The following publications utilize this software library, and refer to it as the *Random Chain Motion Generator (RCMG)* (more specifically the function `ring.RCMG`):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: imt-ring
3
- Version: 1.6.19
3
+ Version: 1.6.21
4
4
  Summary: RING: Recurrent Inertial Graph-based Estimator
5
5
  Author-email: Simon Bachhuber <simon.bachhuber@fau.de>
6
6
  Project-URL: Homepage, https://github.com/SimiPixel/ring
@@ -98,6 +98,14 @@ import os
98
98
  os.environ["MUJOCO_GL"] = "egl"
99
99
  ```
100
100
 
101
+ #### Windows-related: ImportError: DLL load failed while importing ...
102
+
103
+ > ImportError: DLL load failed while importing _multiarray_umath: Das angegebene Modul wurde nicht gefunden.
104
+
105
+ Solution:
106
+ 1. `pip uninstall -y jax jaxlib`
107
+ 2. `conda install -c conda-forge jax`
108
+
101
109
  ## Publications
102
110
 
103
111
  The following publications utilize this software library, and refer to it as the *Random Chain Motion Generator (RCMG)* (more specifically the function `ring.RCMG`):
@@ -199,7 +199,7 @@ def random_position_over_time(
199
199
  POS = jnp.zeros((int(T // t_min) + 1, 2))
200
200
  POS = POS.at[0, 1].set(POS_0)
201
201
 
202
- val_outer = (1, 0.0, 0.0, 0.0, 0.0, key, POS)
202
+ val_outer = (1, 0.0, 0.0, POS_0, POS_0, key, POS)
203
203
  end, *_, consume, POS = jax.lax.while_loop(cond_fn_outer, body_fn_outer, val_outer)
204
204
  POS = jnp.where(
205
205
  (jnp.arange(len(POS)) < end)[:, None],
@@ -34,6 +34,8 @@ class RCMG:
34
34
  add_y_relpose: bool = False,
35
35
  add_y_rootincl: bool = False,
36
36
  add_y_rootincl_kwargs: dict = dict(),
37
+ add_y_rootfull: bool = False,
38
+ add_y_rootfull_kwargs: dict = dict(),
37
39
  sys_ml: Optional[base.System] = None,
38
40
  randomize_positions: bool = False,
39
41
  randomize_motion_artifacts: bool = False,
@@ -73,6 +75,8 @@ class RCMG:
73
75
  add_y_relpose=add_y_relpose,
74
76
  add_y_rootincl=add_y_rootincl,
75
77
  add_y_rootincl_kwargs=add_y_rootincl_kwargs,
78
+ add_y_rootfull=add_y_rootfull,
79
+ add_y_rootfull_kwargs=add_y_rootfull_kwargs,
76
80
  sys_ml=sys_ml,
77
81
  randomize_positions=randomize_positions,
78
82
  randomize_motion_artifacts=randomize_motion_artifacts,
@@ -279,6 +283,8 @@ def _build_mconfig_batched_generator(
279
283
  add_y_relpose: bool,
280
284
  add_y_rootincl: bool,
281
285
  add_y_rootincl_kwargs: dict,
286
+ add_y_rootfull: bool,
287
+ add_y_rootfull_kwargs: dict,
282
288
  sys_ml: base.System,
283
289
  randomize_positions: bool,
284
290
  randomize_motion_artifacts: bool,
@@ -365,7 +371,11 @@ def _build_mconfig_batched_generator(
365
371
  if add_y_relpose:
366
372
  pipe.append(finalize_fns.RelPose(sys_noimu))
367
373
  if add_y_rootincl:
374
+ assert not add_y_rootfull
368
375
  pipe.append(finalize_fns.RootIncl(sys_noimu, **add_y_rootincl_kwargs))
376
+ if add_y_rootfull:
377
+ assert not add_y_rootincl
378
+ pipe.append(finalize_fns.RootFull(sys_noimu, **add_y_rootfull_kwargs))
369
379
  if use_link_number_in_Xy:
370
380
  pipe.append(finalize_fns.Names2Indices(sys_noimu))
371
381
 
@@ -88,6 +88,18 @@ class RootIncl:
88
88
  return (X, y), (key, q, x, sys_x)
89
89
 
90
90
 
91
+ class RootFull:
92
+ def __init__(self, sys: base.System, **kwargs):
93
+ self.sys = sys
94
+ self.kwargs = kwargs
95
+
96
+ def __call__(self, Xy, extras):
97
+ (X, y), (key, q, x, sys_x) = Xy, extras
98
+ y_root_incl = sensors.root_full(self.sys, x, sys_x, **self.kwargs)
99
+ y = utils.dict_union(y, y_root_incl)
100
+ return (X, y), (key, q, x, sys_x)
101
+
102
+
91
103
  _default_imu_kwargs = dict(
92
104
  noisy=True,
93
105
  low_pass_filter_pos_f_cutoff=13.5,
@@ -48,7 +48,11 @@ def make_optimizer(
48
48
  if adap_clip is not None
49
49
  else optax.identity()
50
50
  ),
51
- optax.clip_by_global_norm(0.2) if glob_clip is not None else optax.identity(),
51
+ (
52
+ optax.clip_by_global_norm(glob_clip)
53
+ if glob_clip is not None
54
+ else optax.identity()
55
+ ),
52
56
  inner_opt(schedule, **inner_opt_kwargs),
53
57
  )
54
58
  optimizer = skip_large_update(
@@ -167,7 +167,10 @@ def train_fn(
167
167
  tbp=tbp,
168
168
  )
169
169
 
170
- default_callbacks = []
170
+ # always log, because we also want `i_epsiode` to be logged in wandb
171
+ default_callbacks = [
172
+ ml_callbacks.LogEpisodeTrainingLoopCallback(callback_kill_after_episode)
173
+ ]
171
174
  if metrices is not None:
172
175
  eval_fn = _build_eval_fn(metrices, filter, link_names)
173
176
  default_callbacks.append(_DefaultEvalFnCallback(eval_fn))
@@ -192,11 +195,6 @@ def train_fn(
192
195
  if callback_kill_if_nan:
193
196
  default_callbacks.append(ml_callbacks.NanKillRunCallback())
194
197
 
195
- # always log, because we also want `i_epsiode` to be logged in wandb
196
- default_callbacks.append(
197
- ml_callbacks.LogEpisodeTrainingLoopCallback(callback_kill_after_episode)
198
- )
199
-
200
198
  if callback_kill_after_seconds is not None:
201
199
  default_callbacks.append(
202
200
  ml_callbacks.TimingKillRunCallback(callback_kill_after_seconds)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes