robot-models-lib 0.2.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.
- robot_models/__init__.py +18 -0
- robot_models/actuators/__init__.py +1 -0
- robot_models/actuators/rungs/README.md +24 -0
- robot_models/actuators/rungs/coulomb_viscous/README.md +61 -0
- robot_models/actuators/rungs/coulomb_viscous/model.js +14 -0
- robot_models/actuators/rungs/coulomb_viscous/model.json +102 -0
- robot_models/actuators/rungs/coulomb_viscous/model.py +24 -0
- robot_models/actuators/rungs/datasheet/README.md +65 -0
- robot_models/actuators/rungs/datasheet/model.js +14 -0
- robot_models/actuators/rungs/datasheet/model.json +138 -0
- robot_models/actuators/rungs/datasheet/model.py +24 -0
- robot_models/actuators/rungs/dcmotor/README.md +63 -0
- robot_models/actuators/rungs/dcmotor/model.json +163 -0
- robot_models/actuators/rungs/ideal/README.md +60 -0
- robot_models/actuators/rungs/ideal/model.js +6 -0
- robot_models/actuators/rungs/ideal/model.json +90 -0
- robot_models/actuators/rungs/ideal/model.py +13 -0
- robot_models/actuators/rungs/load/README.md +65 -0
- robot_models/actuators/rungs/load/model.js +15 -0
- robot_models/actuators/rungs/load/model.json +117 -0
- robot_models/actuators/rungs/load/model.py +25 -0
- robot_models/actuators/rungs/lugre/README.md +72 -0
- robot_models/actuators/rungs/lugre/model.js +24 -0
- robot_models/actuators/rungs/lugre/model.json +164 -0
- robot_models/actuators/rungs/lugre/model.py +30 -0
- robot_models/actuators/rungs/ripple/README.md +64 -0
- robot_models/actuators/rungs/ripple/model.js +17 -0
- robot_models/actuators/rungs/ripple/model.json +119 -0
- robot_models/actuators/rungs/ripple/model.py +27 -0
- robot_models/actuators/rungs/stribeck/README.md +65 -0
- robot_models/actuators/rungs/stribeck/model.js +17 -0
- robot_models/actuators/rungs/stribeck/model.json +126 -0
- robot_models/actuators/rungs/stribeck/model.py +28 -0
- robot_models/actuators/servo/README.md +278 -0
- robot_models/actuators/servo/__init__.py +7 -0
- robot_models/actuators/servo/bldc/README.md +186 -0
- robot_models/actuators/servo/bldc/__init__.py +5 -0
- robot_models/actuators/servo/bldc/bldc_motor.py +93 -0
- robot_models/actuators/servo/bldc/ladder.py +268 -0
- robot_models/actuators/servo/foc_controller/README.md +127 -0
- robot_models/actuators/servo/foc_controller/__init__.py +3 -0
- robot_models/actuators/servo/foc_controller/ladder.py +207 -0
- robot_models/actuators/servo/gearbox/README.md +148 -0
- robot_models/actuators/servo/gearbox/__init__.py +5 -0
- robot_models/actuators/servo/gearbox/gearbox.py +36 -0
- robot_models/actuators/servo/gearbox/ladder.py +214 -0
- robot_models/actuators/servo/integrated_servo.py +33 -0
- robot_models/actuators/servo/ladder.py +593 -0
- robot_models/arms/__init__.py +1 -0
- robot_models/arms/rigid_body_chain/README.md +151 -0
- robot_models/arms/rigid_body_chain/__init__.py +3 -0
- robot_models/arms/rigid_body_chain/ladder.py +228 -0
- robot_models/conveyors/__init__.py +1 -0
- robot_models/conveyors/conveyor/README.md +140 -0
- robot_models/conveyors/conveyor/__init__.py +1 -0
- robot_models/conveyors/conveyor/ladder.py +203 -0
- robot_models/datasheet/__init__.py +56 -0
- robot_models/datasheet/datasheet.py +355 -0
- robot_models/datasheet/literal.py +144 -0
- robot_models/datasheet/source.py +328 -0
- robot_models/datasheet/stated.py +135 -0
- robot_models/datasheet/units.py +57 -0
- robot_models/end_effectors/__init__.py +1 -0
- robot_models/end_effectors/gripper/README.md +112 -0
- robot_models/end_effectors/gripper/__init__.py +3 -0
- robot_models/end_effectors/gripper/ladder.py +150 -0
- robot_models/homing/__init__.py +38 -0
- robot_models/homing/cad_bundle.py +206 -0
- robot_models/homing/contact.py +201 -0
- robot_models/homing/fit.py +126 -0
- robot_models/homing/metrics.py +237 -0
- robot_models/homing/protocols.py +72 -0
- robot_models/homing/types.py +256 -0
- robot_models/ladder.py +645 -0
- robot_models/markers/__init__.py +1 -0
- robot_models/markers/aruco_marker/README.md +92 -0
- robot_models/markers/aruco_marker/__init__.py +2 -0
- robot_models/markers/aruco_marker/ladder.py +142 -0
- robot_models/references.py +429 -0
- robot_models/sensors/__init__.py +1 -0
- robot_models/sensors/camera/README.md +118 -0
- robot_models/sensors/camera/__init__.py +3 -0
- robot_models/sensors/camera/ladder.py +108 -0
- robot_models/sensors/encoder/README.md +103 -0
- robot_models/sensors/encoder/__init__.py +5 -0
- robot_models/sensors/encoder/ladder.py +133 -0
- robot_models/sensors/hyperspectral_camera/README.md +107 -0
- robot_models/sensors/hyperspectral_camera/__init__.py +1 -0
- robot_models/sensors/hyperspectral_camera/ladder.py +151 -0
- robot_models/sensors/rgbd/README.md +113 -0
- robot_models/sensors/rgbd/__init__.py +5 -0
- robot_models/sensors/rgbd/ladder.py +113 -0
- robot_models_lib-0.2.0.dist-info/METADATA +143 -0
- robot_models_lib-0.2.0.dist-info/RECORD +96 -0
- robot_models_lib-0.2.0.dist-info/WHEEL +4 -0
- robot_models_lib-0.2.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "robotparts-model-definition/1",
|
|
3
|
+
"category": "actuator",
|
|
4
|
+
"word": "dcmotor",
|
|
5
|
+
"rung": 5,
|
|
6
|
+
"name": "M5.dcmotor",
|
|
7
|
+
"family": "motor electrics",
|
|
8
|
+
"title": "MuJoCo's DC motor",
|
|
9
|
+
"description": "DC motor electrics + heat + cogging + LuGre",
|
|
10
|
+
"summary": "MuJoCo's DC motor actuator (the dcmotor shortcut, mjs_setToDCMotor, MuJoCo 3.16): electrical dynamics, gain and bias (back-EMF, cogging, LuGre friction), with its parameters named and shaped as MuJoCo takes them. The simulator pins the MuJoCo release and the code that sets them.",
|
|
11
|
+
"equation": "MuJoCo's own: mjDYN_DCMOTOR (electrical dynamics), mjGAIN_DCMOTOR (K or K/R), mjBIAS_DCMOTOR (back-EMF, cogging, LuGre friction)",
|
|
12
|
+
"since": "robotparts/2.3",
|
|
13
|
+
"v2_3_kind": "mujoco_dcmotor",
|
|
14
|
+
"inputs": {},
|
|
15
|
+
"state": {},
|
|
16
|
+
"output": {
|
|
17
|
+
"name": "tau_r",
|
|
18
|
+
"definition": "The resisting torque at the output: what the motor must add to move the output as the inputs say.",
|
|
19
|
+
"unit": "N·m",
|
|
20
|
+
"sign": "The joint feels -tau_r (a resisting torque opposes motion; ripple pushes and pulls with angle)."
|
|
21
|
+
},
|
|
22
|
+
"terms": {
|
|
23
|
+
"motorconst": {
|
|
24
|
+
"required": true,
|
|
25
|
+
"definition": "MuJoCo dcmotor's motorconst (2 numbers), as mjs_setToDCMotor takes it; unit mujoco means MuJoCo's own (SI) units for each entry.",
|
|
26
|
+
"value": "number-list",
|
|
27
|
+
"length": 2,
|
|
28
|
+
"si_unit": null,
|
|
29
|
+
"units": {
|
|
30
|
+
"mujoco": null
|
|
31
|
+
},
|
|
32
|
+
"measured_by": "measure-only board calibration, then the envelope ladder"
|
|
33
|
+
},
|
|
34
|
+
"resistance": {
|
|
35
|
+
"required": true,
|
|
36
|
+
"definition": "MuJoCo dcmotor's resistance, the winding resistance the electrical model uses, as mjs_setToDCMotor takes it.",
|
|
37
|
+
"value": "number",
|
|
38
|
+
"si_unit": "Ω",
|
|
39
|
+
"units": {
|
|
40
|
+
"Ω": 1,
|
|
41
|
+
"mΩ": 0.001
|
|
42
|
+
},
|
|
43
|
+
"positive": true,
|
|
44
|
+
"measured_by": "measure-only board calibration, then the envelope ladder"
|
|
45
|
+
},
|
|
46
|
+
"nominal": {
|
|
47
|
+
"required": false,
|
|
48
|
+
"definition": "MuJoCo dcmotor's nominal (3 numbers), as mjs_setToDCMotor takes it; unit mujoco means MuJoCo's own (SI) units for each entry.",
|
|
49
|
+
"value": "number-list",
|
|
50
|
+
"length": 3,
|
|
51
|
+
"si_unit": null,
|
|
52
|
+
"units": {
|
|
53
|
+
"mujoco": null
|
|
54
|
+
},
|
|
55
|
+
"measured_by": "measure-only board calibration, then the envelope ladder"
|
|
56
|
+
},
|
|
57
|
+
"saturation": {
|
|
58
|
+
"required": false,
|
|
59
|
+
"definition": "MuJoCo dcmotor's saturation (3 numbers), as mjs_setToDCMotor takes it; unit mujoco means MuJoCo's own (SI) units for each entry.",
|
|
60
|
+
"value": "number-list",
|
|
61
|
+
"length": 3,
|
|
62
|
+
"si_unit": null,
|
|
63
|
+
"units": {
|
|
64
|
+
"mujoco": null
|
|
65
|
+
},
|
|
66
|
+
"measured_by": "measure-only board calibration, then the envelope ladder"
|
|
67
|
+
},
|
|
68
|
+
"inductance": {
|
|
69
|
+
"required": false,
|
|
70
|
+
"definition": "MuJoCo dcmotor's inductance (2 numbers), as mjs_setToDCMotor takes it; unit mujoco means MuJoCo's own (SI) units for each entry.",
|
|
71
|
+
"value": "number-list",
|
|
72
|
+
"length": 2,
|
|
73
|
+
"si_unit": null,
|
|
74
|
+
"units": {
|
|
75
|
+
"mujoco": null
|
|
76
|
+
},
|
|
77
|
+
"measured_by": "measure-only board calibration, then the envelope ladder"
|
|
78
|
+
},
|
|
79
|
+
"cogging": {
|
|
80
|
+
"required": false,
|
|
81
|
+
"definition": "MuJoCo dcmotor's cogging (3 numbers), as mjs_setToDCMotor takes it; unit mujoco means MuJoCo's own (SI) units for each entry.",
|
|
82
|
+
"value": "number-list",
|
|
83
|
+
"length": 3,
|
|
84
|
+
"si_unit": null,
|
|
85
|
+
"units": {
|
|
86
|
+
"mujoco": null
|
|
87
|
+
},
|
|
88
|
+
"measured_by": "measure-only board calibration, then the envelope ladder"
|
|
89
|
+
},
|
|
90
|
+
"controller": {
|
|
91
|
+
"required": false,
|
|
92
|
+
"definition": "MuJoCo dcmotor's controller (6 numbers), as mjs_setToDCMotor takes it; unit mujoco means MuJoCo's own (SI) units for each entry.",
|
|
93
|
+
"value": "number-list",
|
|
94
|
+
"length": 6,
|
|
95
|
+
"si_unit": null,
|
|
96
|
+
"units": {
|
|
97
|
+
"mujoco": null
|
|
98
|
+
},
|
|
99
|
+
"measured_by": "measure-only board calibration, then the envelope ladder"
|
|
100
|
+
},
|
|
101
|
+
"thermal": {
|
|
102
|
+
"required": false,
|
|
103
|
+
"definition": "MuJoCo dcmotor's thermal (6 numbers), as mjs_setToDCMotor takes it; unit mujoco means MuJoCo's own (SI) units for each entry.",
|
|
104
|
+
"value": "number-list",
|
|
105
|
+
"length": 6,
|
|
106
|
+
"si_unit": null,
|
|
107
|
+
"units": {
|
|
108
|
+
"mujoco": null
|
|
109
|
+
},
|
|
110
|
+
"measured_by": "measure-only board calibration, then the envelope ladder"
|
|
111
|
+
},
|
|
112
|
+
"lugre": {
|
|
113
|
+
"required": false,
|
|
114
|
+
"definition": "MuJoCo dcmotor's lugre (5 numbers), as mjs_setToDCMotor takes it; unit mujoco means MuJoCo's own (SI) units for each entry.",
|
|
115
|
+
"value": "number-list",
|
|
116
|
+
"length": 5,
|
|
117
|
+
"si_unit": null,
|
|
118
|
+
"units": {
|
|
119
|
+
"mujoco": null
|
|
120
|
+
},
|
|
121
|
+
"measured_by": "measure-only board calibration, then the envelope ladder"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"together": [],
|
|
125
|
+
"exclusive": [],
|
|
126
|
+
"constraints": [],
|
|
127
|
+
"variants": {},
|
|
128
|
+
"backends": {
|
|
129
|
+
"mujoco": {
|
|
130
|
+
"how": "native",
|
|
131
|
+
"engine": "mujoco",
|
|
132
|
+
"engine_min": "3.16.0",
|
|
133
|
+
"maps": {
|
|
134
|
+
"motorconst": "motorconst",
|
|
135
|
+
"resistance": "resistance",
|
|
136
|
+
"nominal": "nominal",
|
|
137
|
+
"saturation": "saturation",
|
|
138
|
+
"inductance": "inductance",
|
|
139
|
+
"cogging": "cogging",
|
|
140
|
+
"controller": "controller",
|
|
141
|
+
"thermal": "thermal",
|
|
142
|
+
"lugre": "lugre"
|
|
143
|
+
},
|
|
144
|
+
"note": "MuJoCo 3.16's dcmotor actuator (mjs_setToDCMotor) takes the terms as they are; no other backend implements it."
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"validity": {
|
|
148
|
+
"dims": {
|
|
149
|
+
"output_speed": {
|
|
150
|
+
"definition": "|v|, the output speed the terms were fitted or checked across.",
|
|
151
|
+
"unit": "rad/s"
|
|
152
|
+
},
|
|
153
|
+
"current": {
|
|
154
|
+
"definition": "|i|, the winding current the electrics were fitted across.",
|
|
155
|
+
"unit": "A"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"assumptions": [
|
|
159
|
+
"MuJoCo's own DC motor equations, as its release documents them."
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"readme": "README.md"
|
|
163
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# M0.ideal — The ideal actuator
|
|
2
|
+
|
|
3
|
+
**no losses.** Family: ideal. Rung: 0, the ideal part. Category: actuator.
|
|
4
|
+
|
|
5
|
+
The ideal actuator is the zero every other model is measured from: the part's inertia and ratio, and no losses at all. Nobody should simulate a real robot with it. Its job is the ablation baseline: a rung's gain is how much better it tracks the real part than M0 does on the same runs.
|
|
6
|
+
|
|
7
|
+
**When to use it.** Use it as the first row of every ladder, and to see how much of a twin's error is friction at all.
|
|
8
|
+
|
|
9
|
+
## Equation
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
tau_r = 0; armature = output_inertia
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Output `tau_r` (N·m): The resisting torque at the output: what the motor must add to move the output as the inputs say. The joint feels -tau_r (a resisting torque opposes motion; ripple pushes and pulls with angle).
|
|
16
|
+
|
|
17
|
+
## Terms
|
|
18
|
+
|
|
19
|
+
| term | required | unit (SI) | units a fit may use | measured by |
|
|
20
|
+
|---|---|---|---|---|
|
|
21
|
+
| `output_inertia` | yes | kg·m² | kg·m², kg·cm², kg·mm², g·cm², g·mm² | chirps (or the datasheet) |
|
|
22
|
+
| `gear_ratio` | no | 1 | :1, 1 | reading the datasheet |
|
|
23
|
+
|
|
24
|
+
Declared terms (the rest are registry keys, defined in SCHEMA2.md §7.3):
|
|
25
|
+
|
|
26
|
+
- none
|
|
27
|
+
|
|
28
|
+
## Inputs and state
|
|
29
|
+
|
|
30
|
+
- input `v` (rad/s): The output's angular speed.
|
|
31
|
+
|
|
32
|
+
## Backends
|
|
33
|
+
|
|
34
|
+
| backend | how | engine | what runs |
|
|
35
|
+
|---|---|---|---|
|
|
36
|
+
| python | reference | — | `model.py` (sha256 `ba6b33a4cbd2…`). The contract's own ruler: stdlib Python, torque(terms, inputs, state, dt) -> (tau_r, state), terms in SI. |
|
|
37
|
+
| js | reference | — | `model.js` (sha256 `533668d33e34…`). The same equation as model.py as an ES module (torque(terms, inputs, state, dt) -> {tau, state}); tests/acceptance_v2/test_amendment_2_5.py holds the two to 1e-12. |
|
|
38
|
+
| mujoco | native | mujoco, release named by the fit | MuJoCo expresses it as the joint's armature; nothing runs per step. Maps: armature = `output_inertia`. |
|
|
39
|
+
|
|
40
|
+
**mujoco settings** a fit may state:
|
|
41
|
+
|
|
42
|
+
- `friction_solref`: 2 numbers. The joint's solreffriction (timeconst, dampratio): how hard frictionloss sticks; MuJoCo's soft default creeps below about 0.4 rad/s on a light hinge.
|
|
43
|
+
- `friction_solimp`: 5 numbers, in (0, inf). The joint's solimpfriction (dmin, dmax, width, midpoint, power), every entry > 0.
|
|
44
|
+
|
|
45
|
+
## Validity
|
|
46
|
+
|
|
47
|
+
- A stated model is fitted from nothing, so it has no fitted range.
|
|
48
|
+
- No losses of any kind: the model is a baseline, never a prediction of a real part.
|
|
49
|
+
|
|
50
|
+
## Use it
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
import importlib.util
|
|
54
|
+
spec = importlib.util.spec_from_file_location("ideal", "model.py")
|
|
55
|
+
model = importlib.util.module_from_spec(spec); spec.loader.exec_module(model)
|
|
56
|
+
terms = {...} # a fit's terms in SI (robotparts.models.si_terms(fit, definition) converts them)
|
|
57
|
+
tau_r, state = model.torque(terms, {"v": 0.0}, None, 0.001)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Defined since robotparts/2.5. The contract is SCHEMA2.md §4.3.2; the fit format is `schemas/model.schema.json`.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// The ideal actuator (M0.ideal): the reference backend as an ES module, the same equation as model.py.
|
|
2
|
+
// torque(terms, inputs, state, dt) -> {tau, state}; terms and inputs in SI; the joint feels -tau.
|
|
3
|
+
|
|
4
|
+
export function torque(terms, inputs, state = {}, dt = null) {
|
|
5
|
+
return { tau: 0.0, state: { ...state } };
|
|
6
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "robotparts-model-definition/1",
|
|
3
|
+
"category": "actuator",
|
|
4
|
+
"word": "ideal",
|
|
5
|
+
"rung": 0,
|
|
6
|
+
"name": "M0.ideal",
|
|
7
|
+
"family": "ideal",
|
|
8
|
+
"title": "The ideal actuator",
|
|
9
|
+
"description": "no losses",
|
|
10
|
+
"summary": "The ablation baseline every rung is measured from: the stated inertia and ratio, no friction, no ripple.",
|
|
11
|
+
"equation": "tau_r = 0; armature = output_inertia",
|
|
12
|
+
"since": "robotparts/2.5",
|
|
13
|
+
"v2_3_kind": null,
|
|
14
|
+
"inputs": {
|
|
15
|
+
"v": {
|
|
16
|
+
"definition": "The output's angular speed.",
|
|
17
|
+
"unit": "rad/s"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"state": {},
|
|
21
|
+
"output": {
|
|
22
|
+
"name": "tau_r",
|
|
23
|
+
"definition": "The resisting torque at the output: what the motor must add to move the output as the inputs say.",
|
|
24
|
+
"unit": "N·m",
|
|
25
|
+
"sign": "The joint feels -tau_r (a resisting torque opposes motion; ripple pushes and pulls with angle)."
|
|
26
|
+
},
|
|
27
|
+
"terms": {
|
|
28
|
+
"output_inertia": {
|
|
29
|
+
"required": true,
|
|
30
|
+
"key": true,
|
|
31
|
+
"measured_by": "chirps (or the datasheet)"
|
|
32
|
+
},
|
|
33
|
+
"gear_ratio": {
|
|
34
|
+
"required": false,
|
|
35
|
+
"key": true,
|
|
36
|
+
"measured_by": "reading the datasheet"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"together": [],
|
|
40
|
+
"exclusive": [],
|
|
41
|
+
"constraints": [],
|
|
42
|
+
"variants": {},
|
|
43
|
+
"backends": {
|
|
44
|
+
"python": {
|
|
45
|
+
"how": "reference",
|
|
46
|
+
"implementation": "model.py",
|
|
47
|
+
"implementation_sha256": "ba6b33a4cbd28aea7cb1874e6e646e9f5dd34c67a33290cb489296aeda0d4b76",
|
|
48
|
+
"engine": null,
|
|
49
|
+
"note": "The contract's own ruler: stdlib Python, torque(terms, inputs, state, dt) -> (tau_r, state), terms in SI."
|
|
50
|
+
},
|
|
51
|
+
"js": {
|
|
52
|
+
"how": "reference",
|
|
53
|
+
"implementation": "model.js",
|
|
54
|
+
"implementation_sha256": "533668d33e34e67d5e6d1dcc04fdf3f3f9d1b5d7d409f7f67c264d808a28e805",
|
|
55
|
+
"engine": null,
|
|
56
|
+
"note": "The same equation as model.py as an ES module (torque(terms, inputs, state, dt) -> {tau, state}); tests/acceptance_v2/test_amendment_2_5.py holds the two to 1e-12."
|
|
57
|
+
},
|
|
58
|
+
"mujoco": {
|
|
59
|
+
"how": "native",
|
|
60
|
+
"engine": "mujoco",
|
|
61
|
+
"maps": {
|
|
62
|
+
"armature": "output_inertia"
|
|
63
|
+
},
|
|
64
|
+
"settings": {
|
|
65
|
+
"friction_solref": {
|
|
66
|
+
"definition": "The joint's solreffriction (timeconst, dampratio): how hard frictionloss sticks; MuJoCo's soft default creeps below about 0.4 rad/s on a light hinge.",
|
|
67
|
+
"value": "number-list",
|
|
68
|
+
"length": 2
|
|
69
|
+
},
|
|
70
|
+
"friction_solimp": {
|
|
71
|
+
"definition": "The joint's solimpfriction (dmin, dmax, width, midpoint, power), every entry > 0.",
|
|
72
|
+
"value": "number-list",
|
|
73
|
+
"length": 5,
|
|
74
|
+
"bounds": {
|
|
75
|
+
"min": 0,
|
|
76
|
+
"min_exclusive": true
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"note": "MuJoCo expresses it as the joint's armature; nothing runs per step."
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"validity": {
|
|
84
|
+
"dims": {},
|
|
85
|
+
"assumptions": [
|
|
86
|
+
"No losses of any kind: the model is a baseline, never a prediction of a real part."
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"readme": "README.md"
|
|
90
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""The ideal actuator (M0.ideal): the reference backend, stdlib only. robotparts/2.5, SCHEMA2.md §4.3.2.
|
|
2
|
+
|
|
3
|
+
torque(terms, inputs, state=None, dt=None) -> (tau_r, state). terms are SI values by name (a fit's terms converted
|
|
4
|
+
with the units its definition declares), inputs the model.json inputs in SI. tau_r is the resisting torque at the
|
|
5
|
+
output: the joint feels -tau_r. sign(0) is 0, so a model at rest resists nothing here; a backend that sticks at rest
|
|
6
|
+
(MuJoCo's frictionloss) does that part natively.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import math
|
|
10
|
+
|
|
11
|
+
def torque(terms, inputs, state=None, dt=None):
|
|
12
|
+
# WHY nothing: M0 is the ablation baseline; its inertia is the joint's armature, not a torque.
|
|
13
|
+
return 0.0, dict(state or {})
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# M3.load — Load-dependent friction
|
|
2
|
+
|
|
3
|
+
**Coulomb + viscous + load.** Family: static friction. Rung: 3, friction that changes with state. Category: actuator.
|
|
4
|
+
|
|
5
|
+
Coulomb friction that grows with the load the gearbox carries (gear-mesh friction), plus viscous drag. The plugin raises the joint's friction level each step from the load torque it reads.
|
|
6
|
+
|
|
7
|
+
**When to use it.** Use it for geared joints that carry gravity or payload; measure it with pendulum sweeps at 2-3 masses.
|
|
8
|
+
|
|
9
|
+
## Equation
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
tau_r = (coulomb_friction + friction_load_coefficient*|tau_load|)*sign(v) + viscous_friction*v, tau_load the output load torque
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Output `tau_r` (N·m): The resisting torque at the output: what the motor must add to move the output as the inputs say. The joint feels -tau_r (a resisting torque opposes motion; ripple pushes and pulls with angle).
|
|
16
|
+
|
|
17
|
+
## Terms
|
|
18
|
+
|
|
19
|
+
| term | required | unit (SI) | units a fit may use | measured by |
|
|
20
|
+
|---|---|---|---|---|
|
|
21
|
+
| `coulomb_friction` | yes | N·m | N·m, mN·m | velocity plateaus, both directions, 6-8 speeds, each at least one rotor turn |
|
|
22
|
+
| `viscous_friction` | yes | N·m·s/rad | N·m·s/rad, mN·m·s/rad | velocity plateaus, both directions, 6-8 speeds, each at least one rotor turn |
|
|
23
|
+
| `friction_load_coefficient` | yes | 1 | 1 | pendulum sweeps with 2-3 masses |
|
|
24
|
+
| `output_inertia` | no | kg·m² | kg·m², kg·cm², kg·mm², g·cm², g·mm² | chirps (or the datasheet) |
|
|
25
|
+
|
|
26
|
+
Declared terms (the rest are registry keys, defined in SCHEMA2.md §7.3):
|
|
27
|
+
|
|
28
|
+
- none
|
|
29
|
+
|
|
30
|
+
## Inputs and state
|
|
31
|
+
|
|
32
|
+
- input `v` (rad/s): The output's angular speed.
|
|
33
|
+
- input `tau_load` (N·m): The load torque the part transmits at the output (what it carries besides its own friction).
|
|
34
|
+
|
|
35
|
+
## Backends
|
|
36
|
+
|
|
37
|
+
| backend | how | engine | what runs |
|
|
38
|
+
|---|---|---|---|
|
|
39
|
+
| python | reference | — | `model.py` (sha256 `03b5cb124ad4…`). The contract's own ruler: stdlib Python, torque(terms, inputs, state, dt) -> (tau_r, state), terms in SI. |
|
|
40
|
+
| js | reference | — | `model.js` (sha256 `d50eb2222039…`). The same equation as model.py as an ES module (torque(terms, inputs, state, dt) -> {tau, state}); tests/acceptance_v2/test_amendment_2_5.py holds the two to 1e-12. |
|
|
41
|
+
| mujoco | plugin | mujoco, release named by the fit | `robotparts.mujoco`. The unloaded level sticks natively; the plugin raises the joint's frictionloss each step by friction_load_coefficient * |tau_load|. Maps: armature = `output_inertia`, frictionloss = `coulomb_friction`, damping = `viscous_friction`. |
|
|
42
|
+
|
|
43
|
+
**mujoco settings** a fit may state:
|
|
44
|
+
|
|
45
|
+
- `friction_solref`: 2 numbers. The joint's solreffriction (timeconst, dampratio): how hard frictionloss sticks; MuJoCo's soft default creeps below about 0.4 rad/s on a light hinge.
|
|
46
|
+
- `friction_solimp`: 5 numbers, in (0, inf). The joint's solimpfriction (dmin, dmax, width, midpoint, power), every entry > 0.
|
|
47
|
+
|
|
48
|
+
## Validity
|
|
49
|
+
|
|
50
|
+
- A fit states the range of `output_speed` (rad/s) it holds across: |v|, the output speed the terms were fitted or checked across.
|
|
51
|
+
- A fit states the range of `load_torque` (N·m) it holds across: |tau_load|, the load the friction-load coefficient was fitted across.
|
|
52
|
+
- Friction grows linearly with the load the gear mesh carries, the same in both directions.
|
|
53
|
+
- Valid across the loads it was fitted on.
|
|
54
|
+
|
|
55
|
+
## Use it
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
import importlib.util
|
|
59
|
+
spec = importlib.util.spec_from_file_location("load", "model.py")
|
|
60
|
+
model = importlib.util.module_from_spec(spec); spec.loader.exec_module(model)
|
|
61
|
+
terms = {...} # a fit's terms in SI (robotparts.models.si_terms(fit, definition) converts them)
|
|
62
|
+
tau_r, state = model.torque(terms, {"v": 0.0, "tau_load": 0.0}, None, 0.001)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Defined since robotparts/2.3. It is robotparts/2.3's `load_dependent` kind. The contract is SCHEMA2.md §4.3.2; the fit format is `schemas/model.schema.json`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Load-dependent friction (M3.load): the reference backend as an ES module, the same equation as model.py.
|
|
2
|
+
// torque(terms, inputs, state, dt) -> {tau, state}; terms and inputs in SI; the joint feels -tau.
|
|
3
|
+
|
|
4
|
+
const sign = (x) => (x > 0) - (x < 0);
|
|
5
|
+
|
|
6
|
+
export function torque(terms, inputs, state = {}, dt = null) {
|
|
7
|
+
const v = inputs.v;
|
|
8
|
+
const level = terms.coulomb_friction + terms.friction_load_coefficient * Math.abs(inputs.tau_load);
|
|
9
|
+
return { tau: level * sign(v) + terms.viscous_friction * v, state: { ...state } };
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// The level the friction holds at rest: the exact limit at v -> 0+ (see model.py's static_level).
|
|
13
|
+
export function static_level(terms, inputs = {}, state = {}) {
|
|
14
|
+
return terms.coulomb_friction + terms.friction_load_coefficient * Math.abs(inputs.tau_load ?? 0.0);
|
|
15
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "robotparts-model-definition/1",
|
|
3
|
+
"category": "actuator",
|
|
4
|
+
"word": "load",
|
|
5
|
+
"rung": 3,
|
|
6
|
+
"name": "M3.load",
|
|
7
|
+
"family": "static friction",
|
|
8
|
+
"title": "Load-dependent friction",
|
|
9
|
+
"description": "Coulomb + viscous + load",
|
|
10
|
+
"summary": "Coulomb friction that grows with the load torque the part transmits (gear mesh friction), plus viscous friction.",
|
|
11
|
+
"equation": "tau_r = (coulomb_friction + friction_load_coefficient*|tau_load|)*sign(v) + viscous_friction*v, tau_load the output load torque",
|
|
12
|
+
"since": "robotparts/2.3",
|
|
13
|
+
"v2_3_kind": "load_dependent",
|
|
14
|
+
"inputs": {
|
|
15
|
+
"v": {
|
|
16
|
+
"definition": "The output's angular speed.",
|
|
17
|
+
"unit": "rad/s"
|
|
18
|
+
},
|
|
19
|
+
"tau_load": {
|
|
20
|
+
"definition": "The load torque the part transmits at the output (what it carries besides its own friction).",
|
|
21
|
+
"unit": "N·m"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"state": {},
|
|
25
|
+
"output": {
|
|
26
|
+
"name": "tau_r",
|
|
27
|
+
"definition": "The resisting torque at the output: what the motor must add to move the output as the inputs say.",
|
|
28
|
+
"unit": "N·m",
|
|
29
|
+
"sign": "The joint feels -tau_r (a resisting torque opposes motion; ripple pushes and pulls with angle)."
|
|
30
|
+
},
|
|
31
|
+
"terms": {
|
|
32
|
+
"coulomb_friction": {
|
|
33
|
+
"required": true,
|
|
34
|
+
"key": true,
|
|
35
|
+
"measured_by": "velocity plateaus, both directions, 6-8 speeds, each at least one rotor turn"
|
|
36
|
+
},
|
|
37
|
+
"viscous_friction": {
|
|
38
|
+
"required": true,
|
|
39
|
+
"key": true,
|
|
40
|
+
"measured_by": "velocity plateaus, both directions, 6-8 speeds, each at least one rotor turn"
|
|
41
|
+
},
|
|
42
|
+
"friction_load_coefficient": {
|
|
43
|
+
"required": true,
|
|
44
|
+
"key": true,
|
|
45
|
+
"measured_by": "pendulum sweeps with 2-3 masses"
|
|
46
|
+
},
|
|
47
|
+
"output_inertia": {
|
|
48
|
+
"required": false,
|
|
49
|
+
"key": true,
|
|
50
|
+
"measured_by": "chirps (or the datasheet)"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"together": [],
|
|
54
|
+
"exclusive": [],
|
|
55
|
+
"constraints": [],
|
|
56
|
+
"variants": {},
|
|
57
|
+
"backends": {
|
|
58
|
+
"python": {
|
|
59
|
+
"how": "reference",
|
|
60
|
+
"implementation": "model.py",
|
|
61
|
+
"implementation_sha256": "03b5cb124ad4a66bffa3298b4fccf831f17c33c147d15c43d99ef44920587033",
|
|
62
|
+
"engine": null,
|
|
63
|
+
"note": "The contract's own ruler: stdlib Python, torque(terms, inputs, state, dt) -> (tau_r, state), terms in SI."
|
|
64
|
+
},
|
|
65
|
+
"js": {
|
|
66
|
+
"how": "reference",
|
|
67
|
+
"implementation": "model.js",
|
|
68
|
+
"implementation_sha256": "d50eb2222039019497aa11972aca5479a7517a429ef2b99c28cd8655c9b3a0d0",
|
|
69
|
+
"engine": null,
|
|
70
|
+
"note": "The same equation as model.py as an ES module (torque(terms, inputs, state, dt) -> {tau, state}); tests/acceptance_v2/test_amendment_2_5.py holds the two to 1e-12."
|
|
71
|
+
},
|
|
72
|
+
"mujoco": {
|
|
73
|
+
"how": "plugin",
|
|
74
|
+
"implementation": "robotparts.mujoco",
|
|
75
|
+
"engine": "mujoco",
|
|
76
|
+
"maps": {
|
|
77
|
+
"armature": "output_inertia",
|
|
78
|
+
"frictionloss": "coulomb_friction",
|
|
79
|
+
"damping": "viscous_friction"
|
|
80
|
+
},
|
|
81
|
+
"settings": {
|
|
82
|
+
"friction_solref": {
|
|
83
|
+
"definition": "The joint's solreffriction (timeconst, dampratio): how hard frictionloss sticks; MuJoCo's soft default creeps below about 0.4 rad/s on a light hinge.",
|
|
84
|
+
"value": "number-list",
|
|
85
|
+
"length": 2
|
|
86
|
+
},
|
|
87
|
+
"friction_solimp": {
|
|
88
|
+
"definition": "The joint's solimpfriction (dmin, dmax, width, midpoint, power), every entry > 0.",
|
|
89
|
+
"value": "number-list",
|
|
90
|
+
"length": 5,
|
|
91
|
+
"bounds": {
|
|
92
|
+
"min": 0,
|
|
93
|
+
"min_exclusive": true
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"note": "The unloaded level sticks natively; the plugin raises the joint's frictionloss each step by friction_load_coefficient * |tau_load|."
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"validity": {
|
|
101
|
+
"dims": {
|
|
102
|
+
"output_speed": {
|
|
103
|
+
"definition": "|v|, the output speed the terms were fitted or checked across.",
|
|
104
|
+
"unit": "rad/s"
|
|
105
|
+
},
|
|
106
|
+
"load_torque": {
|
|
107
|
+
"definition": "|tau_load|, the load the friction-load coefficient was fitted across.",
|
|
108
|
+
"unit": "N·m"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"assumptions": [
|
|
112
|
+
"Friction grows linearly with the load the gear mesh carries, the same in both directions.",
|
|
113
|
+
"Valid across the loads it was fitted on."
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"readme": "README.md"
|
|
117
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Load-dependent friction (M3.load): the reference backend, stdlib only. robotparts/2.5, SCHEMA2.md §4.3.2.
|
|
2
|
+
|
|
3
|
+
torque(terms, inputs, state=None, dt=None) -> (tau_r, state). terms are SI values by name (a fit's terms converted
|
|
4
|
+
with the units its definition declares), inputs the model.json inputs in SI. tau_r is the resisting torque at the
|
|
5
|
+
output: the joint feels -tau_r. sign(0) is 0, so a model at rest resists nothing here; a backend that sticks at rest
|
|
6
|
+
(MuJoCo's frictionloss) does that part natively.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import math
|
|
10
|
+
|
|
11
|
+
def _sign(x):
|
|
12
|
+
return (x > 0) - (x < 0)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def torque(terms, inputs, state=None, dt=None):
|
|
16
|
+
v, load = inputs["v"], inputs["tau_load"]
|
|
17
|
+
level = terms["coulomb_friction"] + terms["friction_load_coefficient"] * abs(load)
|
|
18
|
+
return level * _sign(v) + terms["viscous_friction"] * v, dict(state or {})
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def static_level(terms, inputs, state=None):
|
|
22
|
+
"""The level the friction holds at rest: the exact limit of the resisting torque's friction part as v -> 0+
|
|
23
|
+
(judge r3 #2: a backend that sticks natively, MuJoCo's frictionloss, holds this, never a torque sampled at a small
|
|
24
|
+
speed). The state is read, never advanced."""
|
|
25
|
+
return terms["coulomb_friction"] + terms["friction_load_coefficient"] * abs(inputs.get("tau_load", 0.0))
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# M3.lugre — LuGre friction
|
|
2
|
+
|
|
3
|
+
**Coulomb + viscous + Stribeck + bristle state.** Family: dynamic friction. Rung: 3, friction that changes with state. Category: actuator.
|
|
4
|
+
|
|
5
|
+
The LuGre dynamic friction model: the contact behaves like bristles that deflect before they slide, which gives pre-sliding motion, the Stribeck curve and frictional lag from one state variable. It is stateful, so every backend integrates z each step.
|
|
6
|
+
|
|
7
|
+
**When to use it.** Use it when small reversals and holding position matter more than the plateaus explain.
|
|
8
|
+
|
|
9
|
+
## Equation
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
dz/dt = v - sigma0*|v|*z/g(v), g(v) = coulomb_friction + (breakaway_torque - coulomb_friction)*exp(-(|v|/stribeck_velocity)^stribeck_exponent); tau_r = sigma0*z + sigma1*dz/dt + sigma2*v; stribeck_exponent is 2 when absent
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Output `tau_r` (N·m): The resisting torque at the output: what the motor must add to move the output as the inputs say. The joint feels -tau_r (a resisting torque opposes motion; ripple pushes and pulls with angle).
|
|
16
|
+
|
|
17
|
+
## Terms
|
|
18
|
+
|
|
19
|
+
| term | required | unit (SI) | units a fit may use | measured by |
|
|
20
|
+
|---|---|---|---|---|
|
|
21
|
+
| `coulomb_friction` | yes | N·m | N·m, mN·m | velocity plateaus, both directions, 6-8 speeds, each at least one rotor turn |
|
|
22
|
+
| `breakaway_torque` | yes | N·m | N·m, mN·m | slow plateaus below 0.5 rad/s |
|
|
23
|
+
| `stribeck_velocity` | yes | rad/s | rad/s, rpm, deg/s | slow plateaus below 0.5 rad/s |
|
|
24
|
+
| `sigma0` | yes | N·m/rad | N·m/rad | small reversals, recorded fast |
|
|
25
|
+
| `sigma1` | yes | N·m·s/rad | N·m·s/rad, mN·m·s/rad | small reversals, recorded fast |
|
|
26
|
+
| `sigma2` | yes | N·m·s/rad | N·m·s/rad, mN·m·s/rad | velocity plateaus, both directions, 6-8 speeds, each at least one rotor turn |
|
|
27
|
+
| `stribeck_exponent` | no | 1 | 1 | slow plateaus below 0.5 rad/s |
|
|
28
|
+
| `output_inertia` | no | kg·m² | kg·m², kg·cm², kg·mm², g·cm², g·mm² | chirps (or the datasheet) |
|
|
29
|
+
|
|
30
|
+
Declared terms (the rest are registry keys, defined in SCHEMA2.md §7.3):
|
|
31
|
+
|
|
32
|
+
- `sigma0`: LuGre bristle stiffness sigma0: output torque per radian of bristle deflection z.
|
|
33
|
+
- `sigma1`: LuGre bristle (micro-)damping sigma1: output torque per rad/s of bristle deflection rate.
|
|
34
|
+
- `sigma2`: LuGre viscous coefficient sigma2: output torque per rad/s of output speed (the other kinds' viscous_friction).
|
|
35
|
+
- `stribeck_exponent`: Shape exponent d of the Stribeck curve in g(v); 2 when absent.
|
|
36
|
+
|
|
37
|
+
## Inputs and state
|
|
38
|
+
|
|
39
|
+
- input `v` (rad/s): The output's angular speed.
|
|
40
|
+
- input `dt` (s): The step the simulator advances by (a stateful model integrates its state over it).
|
|
41
|
+
- state `z` (rad, starts at 0): The bristles' mean deflection.
|
|
42
|
+
|
|
43
|
+
## Backends
|
|
44
|
+
|
|
45
|
+
| backend | how | engine | what runs |
|
|
46
|
+
|---|---|---|---|
|
|
47
|
+
| python | reference | — | `model.py` (sha256 `63cb93d20325…`). The contract's own ruler: stdlib Python, torque(terms, inputs, state, dt) -> (tau_r, state), terms in SI. |
|
|
48
|
+
| js | reference | — | `model.js` (sha256 `e8e42ee33d8a…`). The same equation as model.py as an ES module (torque(terms, inputs, state, dt) -> {tau, state}); tests/acceptance_v2/test_amendment_2_5.py holds the two to 1e-12. |
|
|
49
|
+
| mujoco | plugin | mujoco, release named by the fit | `robotparts.mujoco`. No native part: the plugin integrates z each step with the simulator's dt (semi-implicit, stable for any dt) and applies the whole torque. Maps: armature = `output_inertia`. |
|
|
50
|
+
|
|
51
|
+
**mujoco settings** a fit may state:
|
|
52
|
+
|
|
53
|
+
- `friction_solref`: 2 numbers. The joint's solreffriction (timeconst, dampratio): how hard frictionloss sticks; MuJoCo's soft default creeps below about 0.4 rad/s on a light hinge.
|
|
54
|
+
- `friction_solimp`: 5 numbers, in (0, inf). The joint's solimpfriction (dmin, dmax, width, midpoint, power), every entry > 0.
|
|
55
|
+
|
|
56
|
+
## Validity
|
|
57
|
+
|
|
58
|
+
- A fit states the range of `output_speed` (rad/s) it holds across: |v|, the output speed the terms were fitted or checked across.
|
|
59
|
+
- One bristle state for the whole drivetrain.
|
|
60
|
+
- Pre-sliding is fitted from small reversals; larger stiction effects outside their amplitude are extrapolated.
|
|
61
|
+
|
|
62
|
+
## Use it
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
import importlib.util
|
|
66
|
+
spec = importlib.util.spec_from_file_location("lugre", "model.py")
|
|
67
|
+
model = importlib.util.module_from_spec(spec); spec.loader.exec_module(model)
|
|
68
|
+
terms = {...} # a fit's terms in SI (robotparts.models.si_terms(fit, definition) converts them)
|
|
69
|
+
tau_r, state = model.torque(terms, {"v": 0.0}, None, 0.001)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Defined since robotparts/2.3. It is robotparts/2.3's `lugre` kind. The contract is SCHEMA2.md §4.3.2; the fit format is `schemas/model.schema.json`.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// LuGre friction (M3.lugre): the reference backend as an ES module, the same equation as model.py.
|
|
2
|
+
// torque(terms, inputs, state, dt) -> {tau, state}; terms and inputs in SI; the joint feels -tau.
|
|
3
|
+
|
|
4
|
+
function g(terms, v) {
|
|
5
|
+
const fc = terms.coulomb_friction, fs = terms.breakaway_torque, vs = terms.stribeck_velocity;
|
|
6
|
+
const d = terms.stribeck_exponent ?? 2.0;
|
|
7
|
+
return fc + (fs - fc) * Math.exp(-((Math.abs(v) / vs) ** d));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function torque(terms, inputs, state = {}, dt = null) {
|
|
11
|
+
const v = inputs.v;
|
|
12
|
+
const s0 = terms.sigma0, s1 = terms.sigma1, s2 = terms.sigma2;
|
|
13
|
+
const z = state.z ?? 0.0;
|
|
14
|
+
const gv = g(terms, v);
|
|
15
|
+
let zNext, zdot;
|
|
16
|
+
if (!dt) {
|
|
17
|
+
zNext = (gv * ((v > 0) - (v < 0))) / s0;
|
|
18
|
+
zdot = 0.0;
|
|
19
|
+
} else {
|
|
20
|
+
zNext = (z + v * dt) / (1.0 + (s0 * Math.abs(v) * dt) / gv);
|
|
21
|
+
zdot = (zNext - z) / dt;
|
|
22
|
+
}
|
|
23
|
+
return { tau: s0 * zNext + s1 * zdot + s2 * v, state: { z: zNext } };
|
|
24
|
+
}
|