jaxsim 0.6.1.dev13__py3-none-any.whl → 0.6.2.dev102__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.
- jaxsim/__init__.py +1 -1
- jaxsim/_version.py +2 -2
- jaxsim/api/__init__.py +3 -1
- jaxsim/api/actuation_model.py +96 -0
- jaxsim/api/com.py +8 -8
- jaxsim/api/contact.py +15 -255
- jaxsim/api/contact_model.py +101 -0
- jaxsim/api/data.py +258 -556
- jaxsim/api/frame.py +7 -7
- jaxsim/api/integrators.py +76 -0
- jaxsim/api/kin_dyn_parameters.py +41 -58
- jaxsim/api/link.py +7 -7
- jaxsim/api/model.py +190 -453
- jaxsim/api/ode.py +34 -338
- jaxsim/api/references.py +2 -2
- jaxsim/exceptions.py +2 -2
- jaxsim/math/__init__.py +4 -3
- jaxsim/math/joint_model.py +17 -107
- jaxsim/mujoco/model.py +1 -1
- jaxsim/mujoco/utils.py +2 -2
- jaxsim/parsers/kinematic_graph.py +1 -3
- jaxsim/rbda/aba.py +7 -4
- jaxsim/rbda/collidable_points.py +7 -98
- jaxsim/rbda/contacts/__init__.py +2 -10
- jaxsim/rbda/contacts/common.py +0 -138
- jaxsim/rbda/contacts/relaxed_rigid.py +154 -9
- jaxsim/rbda/crba.py +5 -2
- jaxsim/rbda/forward_kinematics.py +37 -12
- jaxsim/rbda/jacobian.py +15 -6
- jaxsim/rbda/rnea.py +7 -4
- jaxsim/rbda/utils.py +3 -3
- jaxsim/utils/jaxsim_dataclass.py +5 -1
- {jaxsim-0.6.1.dev13.dist-info → jaxsim-0.6.2.dev102.dist-info}/METADATA +7 -9
- jaxsim-0.6.2.dev102.dist-info/RECORD +69 -0
- jaxsim/api/ode_data.py +0 -401
- jaxsim/integrators/__init__.py +0 -2
- jaxsim/integrators/common.py +0 -592
- jaxsim/integrators/fixed_step.py +0 -153
- jaxsim/integrators/variable_step.py +0 -706
- jaxsim/rbda/contacts/rigid.py +0 -462
- jaxsim/rbda/contacts/soft.py +0 -480
- jaxsim/rbda/contacts/visco_elastic.py +0 -1066
- jaxsim-0.6.1.dev13.dist-info/RECORD +0 -74
- {jaxsim-0.6.1.dev13.dist-info → jaxsim-0.6.2.dev102.dist-info}/LICENSE +0 -0
- {jaxsim-0.6.1.dev13.dist-info → jaxsim-0.6.2.dev102.dist-info}/WHEEL +0 -0
- {jaxsim-0.6.1.dev13.dist-info → jaxsim-0.6.2.dev102.dist-info}/top_level.txt +0 -0
jaxsim/integrators/fixed_step.py
DELETED
@@ -1,153 +0,0 @@
|
|
1
|
-
import dataclasses
|
2
|
-
from typing import ClassVar, Generic
|
3
|
-
|
4
|
-
import jax.numpy as jnp
|
5
|
-
import jax_dataclasses
|
6
|
-
|
7
|
-
import jaxsim.api as js
|
8
|
-
import jaxsim.typing as jtp
|
9
|
-
|
10
|
-
from .common import ExplicitRungeKutta, ExplicitRungeKuttaSO3Mixin, PyTreeType
|
11
|
-
|
12
|
-
ODEStateDerivative = js.ode_data.ODEState
|
13
|
-
|
14
|
-
# =====================================================
|
15
|
-
# Explicit Runge-Kutta integrators operating on PyTrees
|
16
|
-
# =====================================================
|
17
|
-
|
18
|
-
|
19
|
-
@jax_dataclasses.pytree_dataclass
|
20
|
-
class ForwardEuler(ExplicitRungeKutta[PyTreeType], Generic[PyTreeType]):
|
21
|
-
"""
|
22
|
-
Forward Euler integrator.
|
23
|
-
"""
|
24
|
-
|
25
|
-
A: jtp.Matrix = dataclasses.field(
|
26
|
-
default_factory=lambda: jnp.atleast_2d(0).astype(float), compare=False
|
27
|
-
)
|
28
|
-
b: jtp.Matrix = dataclasses.field(
|
29
|
-
default_factory=lambda: jnp.atleast_2d(1).astype(float), compare=False
|
30
|
-
)
|
31
|
-
|
32
|
-
c: jtp.Vector = dataclasses.field(
|
33
|
-
default_factory=lambda: jnp.atleast_1d(0).astype(float), compare=False
|
34
|
-
)
|
35
|
-
|
36
|
-
row_index_of_solution: int = 0
|
37
|
-
order_of_bT_rows: tuple[int, ...] = (1,)
|
38
|
-
index_of_fsal: jtp.IntLike | None = None
|
39
|
-
fsal_enabled_if_supported: bool = False
|
40
|
-
|
41
|
-
|
42
|
-
@jax_dataclasses.pytree_dataclass
|
43
|
-
class Heun2(ExplicitRungeKutta[PyTreeType], Generic[PyTreeType]):
|
44
|
-
"""
|
45
|
-
Heun's second-order integrator.
|
46
|
-
"""
|
47
|
-
|
48
|
-
A: jtp.Matrix = dataclasses.field(
|
49
|
-
default_factory=lambda: jnp.array(
|
50
|
-
[
|
51
|
-
[0, 0],
|
52
|
-
[1, 0],
|
53
|
-
]
|
54
|
-
).astype(float),
|
55
|
-
compare=False,
|
56
|
-
)
|
57
|
-
|
58
|
-
b: jtp.Matrix = dataclasses.field(
|
59
|
-
default_factory=lambda: (
|
60
|
-
jnp.atleast_2d(
|
61
|
-
jnp.array([1 / 2, 1 / 2]),
|
62
|
-
)
|
63
|
-
.astype(float)
|
64
|
-
.transpose()
|
65
|
-
),
|
66
|
-
compare=False,
|
67
|
-
)
|
68
|
-
|
69
|
-
c: jtp.Vector = dataclasses.field(
|
70
|
-
default_factory=lambda: jnp.array(
|
71
|
-
[0, 1],
|
72
|
-
).astype(float),
|
73
|
-
compare=False,
|
74
|
-
)
|
75
|
-
|
76
|
-
row_index_of_solution: ClassVar[int] = 0
|
77
|
-
order_of_bT_rows: ClassVar[tuple[int, ...]] = (2,)
|
78
|
-
index_of_fsal: jtp.IntLike | None = None
|
79
|
-
fsal_enabled_if_supported: bool = False
|
80
|
-
|
81
|
-
|
82
|
-
@jax_dataclasses.pytree_dataclass
|
83
|
-
class RungeKutta4(ExplicitRungeKutta[PyTreeType], Generic[PyTreeType]):
|
84
|
-
"""
|
85
|
-
Fourth-order Runge-Kutta integrator.
|
86
|
-
"""
|
87
|
-
|
88
|
-
A: jtp.Matrix = dataclasses.field(
|
89
|
-
default_factory=lambda: jnp.array(
|
90
|
-
[
|
91
|
-
[0, 0, 0, 0],
|
92
|
-
[1 / 2, 0, 0, 0],
|
93
|
-
[0, 1 / 2, 0, 0],
|
94
|
-
[0, 0, 1, 0],
|
95
|
-
]
|
96
|
-
).astype(float),
|
97
|
-
compare=False,
|
98
|
-
)
|
99
|
-
|
100
|
-
b: jtp.Matrix = dataclasses.field(
|
101
|
-
default_factory=lambda: (
|
102
|
-
jnp.atleast_2d(
|
103
|
-
jnp.array([1 / 6, 1 / 3, 1 / 3, 1 / 6]),
|
104
|
-
)
|
105
|
-
.astype(float)
|
106
|
-
.transpose()
|
107
|
-
),
|
108
|
-
compare=False,
|
109
|
-
)
|
110
|
-
|
111
|
-
c: jtp.Vector = dataclasses.field(
|
112
|
-
default_factory=lambda: jnp.array(
|
113
|
-
[0, 1 / 2, 1 / 2, 1],
|
114
|
-
).astype(float),
|
115
|
-
compare=False,
|
116
|
-
)
|
117
|
-
|
118
|
-
row_index_of_solution: ClassVar[int] = 0
|
119
|
-
order_of_bT_rows: ClassVar[tuple[int, ...]] = (4,)
|
120
|
-
index_of_fsal: jtp.IntLike | None = None
|
121
|
-
fsal_enabled_if_supported: bool = False
|
122
|
-
|
123
|
-
|
124
|
-
# ===============================================================================
|
125
|
-
# Explicit Runge-Kutta integrators operating on ODEState and integrating on SO(3)
|
126
|
-
# ===============================================================================
|
127
|
-
|
128
|
-
|
129
|
-
@jax_dataclasses.pytree_dataclass
|
130
|
-
class ForwardEulerSO3(ExplicitRungeKuttaSO3Mixin, ForwardEuler[js.ode_data.ODEState]):
|
131
|
-
"""
|
132
|
-
Forward Euler integrator for SO(3) states.
|
133
|
-
"""
|
134
|
-
|
135
|
-
pass
|
136
|
-
|
137
|
-
|
138
|
-
@jax_dataclasses.pytree_dataclass
|
139
|
-
class Heun2SO3(ExplicitRungeKuttaSO3Mixin, Heun2[js.ode_data.ODEState]):
|
140
|
-
"""
|
141
|
-
Heun's second-order integrator for SO(3) states.
|
142
|
-
"""
|
143
|
-
|
144
|
-
pass
|
145
|
-
|
146
|
-
|
147
|
-
@jax_dataclasses.pytree_dataclass
|
148
|
-
class RungeKutta4SO3(ExplicitRungeKuttaSO3Mixin, RungeKutta4[js.ode_data.ODEState]):
|
149
|
-
"""
|
150
|
-
Fourth-order Runge-Kutta integrator for SO(3) states.
|
151
|
-
"""
|
152
|
-
|
153
|
-
pass
|