imt-ring 1.6.31__py3-none-any.whl → 1.6.32__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: imt-ring
3
- Version: 1.6.31
3
+ Version: 1.6.32
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
@@ -6,7 +6,7 @@ ring/spatial.py,sha256=nmZ-UhRanhyM34bez8uCS4wMwaKqLkuEbgKGP5XNH60,2351
6
6
  ring/algorithms/__init__.py,sha256=IiK9EN5Xgs3dB075-A-H-Yad0Z7vzvKIJF2g6X_-C_8,1224
7
7
  ring/algorithms/_random.py,sha256=UMyv-VPZLcErrKqs0XB83QJjs8GrmoNsv-zRSxGXvnI,14490
8
8
  ring/algorithms/dynamics.py,sha256=dpe-F3Yq4sY2dY6DQW3v7TnPLRdxdkePtdbGPQIrijg,10997
9
- ring/algorithms/jcalc.py,sha256=St4hjp8LZYQg6TFFTqh7psAp1W2DvZwNe6NhXe8vrf0,35490
9
+ ring/algorithms/jcalc.py,sha256=QafnCKa1mjEl7nL_KuadPJB5ebW31NKnkdcKn2YtSsM,36171
10
10
  ring/algorithms/kinematics.py,sha256=DOboHI517Vx0pRJUFZtZPmK_qFaiKiQe-37B-M0aC-c,7422
11
11
  ring/algorithms/sensors.py,sha256=0xOzdQIc1kBF0CkoPXWWCx3MmV4SG3wj7knVnnMWq9M,18124
12
12
  ring/algorithms/custom_joints/__init__.py,sha256=3pQ-Is_HBTQDkzESCNg9VfoP8wvseWmooryG8ERnu_A,366
@@ -86,7 +86,7 @@ ring/utils/randomize_sys.py,sha256=G_vBIo0OwQkXL2u0djwbaoaeb02C4LQCTNNloOYIU2M,3
86
86
  ring/utils/utils.py,sha256=tJaWXLGOTwkxJQj2l23dX97wO3aZYhM2qd7eNuMRs84,6907
87
87
  ring/utils/register_gym_envs/__init__.py,sha256=PtPIRBQJ16339xZ9G9VpvqrvcGbQ_Pk_SUz4tQPa9nQ,94
88
88
  ring/utils/register_gym_envs/saddle.py,sha256=tA5CyW_akSXyDm0xJ83CtOrUMVElH0f9vZtEDDJQalI,4422
89
- imt_ring-1.6.31.dist-info/METADATA,sha256=ISL0fShgxIGskumWa3mtqCBcOvOfEtJc4XE8Rt-EJCA,4251
90
- imt_ring-1.6.31.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
91
- imt_ring-1.6.31.dist-info/top_level.txt,sha256=EiT790-lAyi8iwTzJArH3f2k77rwhDn00q-4PlmvDQo,5
92
- imt_ring-1.6.31.dist-info/RECORD,,
89
+ imt_ring-1.6.32.dist-info/METADATA,sha256=6bNRA4bhdmUOnqV8ZfR-tl5wbk-awzTE7qmLzDOI1xs,4251
90
+ imt_ring-1.6.32.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
91
+ imt_ring-1.6.32.dist-info/top_level.txt,sha256=EiT790-lAyi8iwTzJArH3f2k77rwhDn00q-4PlmvDQo,5
92
+ imt_ring-1.6.32.dist-info/RECORD,,
ring/algorithms/jcalc.py CHANGED
@@ -412,6 +412,9 @@ def _find_interval(t: jax.Array, boundaries: jax.Array):
412
412
  def join_motionconfigs(
413
413
  configs: list[MotionConfig], boundaries: list[float]
414
414
  ) -> MotionConfig:
415
+ # to avoid a circular import due to `ring.utils.randomize_sys` importing `jcalc`
416
+ from ring.utils import tree_equal
417
+
415
418
  assert len(configs) == (
416
419
  len(boundaries) + 1
417
420
  ), "length of `boundaries` should be one less than length of `configs`"
@@ -434,10 +437,22 @@ def join_motionconfigs(
434
437
  time_independent_fields = [key for key in attrs if not is_time_dependent_field(key)]
435
438
 
436
439
  for time_dep_field in time_independent_fields:
437
- field_values = set([getattr(config, time_dep_field) for config in configs])
438
- assert (
439
- len(field_values) == 1
440
- ), f"MotionConfig.{time_dep_field}={field_values}. Should be one unique value.."
440
+ try:
441
+ field_values = set([getattr(config, time_dep_field) for config in configs])
442
+ assert (
443
+ len(field_values) == 1
444
+ ), f"MotionConfig.{time_dep_field}={field_values}. "
445
+ "Should be one unique value.."
446
+ except (
447
+ TypeError
448
+ ): # dict is not hashable so test equality of all elements differently
449
+ comparison_ele = getattr(configs[0], time_dep_field)
450
+ for other_config in configs[1:]:
451
+ other_ele = getattr(other_config, time_dep_field)
452
+ assert tree_equal(
453
+ comparison_ele, other_ele
454
+ ), f"MotionConfig.{time_dep_field} with {comparison_ele} != {other_ele}"
455
+ " Should be one unique value.."
441
456
 
442
457
  changes = {field: new_value(field) for field in time_dependent_fields}
443
458
  return replace(configs[0], **changes)