File size: 12,158 Bytes
0c3dd1d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "tr-c1-episode/1",
  "title": "Case 1 lock-step ART runner: one episode",
  "description": "Validated (with defaults filled) by art_runner/config.py:normalize. Unknown keys are rejected. All times must be multiples of the 1 ms physics step. The episode file given to campaign.py is a JSON list of these objects (or {\"episodes\": [...]}).",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "episode_id",
    "scenario_id",
    "controller",
    "reference",
    "initial_pose",
    "horizon_s",
    "latency"
  ],
  "properties": {
    "schema": {
      "const": "tr-c1-episode/1"
    },
    "episode_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_.\\-]{1,160}$",
      "description": "unique; output directory name; resume key"
    },
    "scenario_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_.\\-]{1,160}$",
      "description": "groups episodes that share a perturbation draw across controllers"
    },
    "controller": {
      "type": "string",
      "description": "released controllers run verbatim (unmodified) through the released ROS node: mpc | nnmpc | pid | nnhd. Simulation-only plug-ins: plugin:<name> with <name> in replica_pid | pure_pursuit | stanley | wrapped_released | mpc_n5 (config.normalize rejects any other name; registered controller ids in default_config.json controller_registry).",
      "pattern": "^(mpc|nnmpc|pid|nnhd|plugin:[a-z0-9_]+)$"
    },
    "controller_params": {
      "type": "object",
      "description": "plug-ins only (released controllers take no parameters); unknown keys and non-finite values are rejected (art_runner/config.py PLUGIN_PARAM_SPECS). wrapped_released: {base (required): mpc|nnmpc|pid|nnhd, steering_scale (1.0), shared_speed (false), kp_speed (1.0), throttle_bias (0.0)}. pure_pursuit: {lookahead_m (1.0, > 0), wheelbase_m (0.5, > 0), k_v (1.0), throttle_ff (0.0)}. stanley: {k (1.0), softening (0.5, >= 0), k_v (1.0), throttle_ff (0.0)}. Pure pursuit and Stanley throttle = clip(throttle_ff + k_v (v_ref - v), 0, 1). mpc_n5, replica_pid: no parameters."
    },
    "reference": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "name"
          ],
          "properties": {
            "type": {
              "const": "released_csv"
            },
            "name": {
              "type": "string",
              "description": "stem in /sbel/Desktop/waypoints_paths, e.g. path_iros_1, path_iros_2, lot17_sinsquare, straight_line"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "name"
          ],
          "properties": {
            "type": {
              "const": "csv_transformed"
            },
            "name": {
              "type": "string"
            },
            "rotate": {
              "type": "number",
              "description": "rad, about the origin, applied first; yaw += rotate (wrapped)"
            },
            "dx": {
              "type": "number"
            },
            "dy": {
              "type": "number"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type"
          ],
          "properties": {
            "type": {
              "const": "straight"
            },
            "x0": {
              "type": "number",
              "default": 0
            },
            "y0": {
              "type": "number",
              "default": 0
            },
            "heading": {
              "type": "number",
              "default": 0
            },
            "s_start": {
              "type": "number",
              "default": -10
            },
            "s_end": {
              "type": "number",
              "default": 60
            },
            "spacing": {
              "type": "number",
              "default": 0.1
            },
            "v_ref": {
              "type": "number",
              "default": 1.0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "points"
          ],
          "properties": {
            "type": {
              "const": "array"
            },
            "points": {
              "type": "array",
              "items": {
                "type": "array",
                "minItems": 4,
                "maxItems": 4
              }
            }
          }
        }
      ]
    },
    "initial_pose": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "x",
        "y",
        "yaw"
      ],
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "yaw": {
          "type": "number",
          "description": "rad, CCW positive"
        },
        "frame": {
          "enum": [
            "chassis_ref",
            "cog"
          ],
          "default": "chassis_ref",
          "description": "chassis_ref: ARTcar::SetInitPosition (as demo_ROS_dART.cpp, z=0.25, at rest). cog: (x,y) is the chassis COG (the position the controller observes); converted with the chassis COM offset (-0.1336,-0.0014) m rotated by yaw."
        }
      }
    },
    "horizon_s": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 3600,
      "description": "fixed horizon (fixed_horizon) or timeout (path_completion), sim time from t=0"
    },
    "control_start_s": {
      "type": "number",
      "minimum": 0,
      "default": 0,
      "description": "first controller tick (ideal) / timer origin (ros_emulated); metrics are reported relative to it"
    },
    "latency": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "model"
          ],
          "properties": {
            "model": {
              "const": "ideal"
            },
            "controller_period_s": {
              "type": "number",
              "default": 0.1
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "model",
            "controller_phase_s",
            "compute_delay_s"
          ],
          "properties": {
            "model": {
              "const": "ros_emulated"
            },
            "controller_phase_s": {
              "type": "number",
              "minimum": 0,
              "description": "offset of the controller timer relative to control_start_s (NO default; to be calibrated)"
            },
            "compute_delay_s": {
              "type": "number",
              "minimum": 0,
              "description": "tick -> message arrival at the simulator (NO default; to be calibrated)"
            },
            "state_delay_s": {
              "type": "number",
              "minimum": 0,
              "default": 0,
              "description": "publication -> visible to controller"
            },
            "controller_period_s": {
              "type": "number",
              "default": 0.1
            },
            "state_rate_hz": {
              "type": "number",
              "default": 25
            },
            "driver_rate_hz": {
              "type": "number",
              "default": 10
            }
          }
        }
      ]
    },
    "perturbation": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "steering_bias": {
          "type": "number",
          "minimum": -1,
          "maximum": 1,
          "default": 0,
          "description": "added to the steering command at the driver (then ChDriver clamps to [-1,1])"
        },
        "actuation_delay_s": {
          "type": "number",
          "minimum": 0,
          "maximum": 10,
          "default": 0,
          "description": "extra delay between tick and application (ideal) / message arrival (ros_emulated)"
        },
        "friction": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 2,
          "default": null,
          "description": "terrain Coefficient of Friction override (null = unchanged RigidPlane.json, 0.9). TMEASY clamps to [0.1,1.0]."
        },
        "obs_noise": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "seed": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "std_x": {
              "type": "number",
              "minimum": 0,
              "default": 0
            },
            "std_y": {
              "type": "number",
              "minimum": 0,
              "default": 0
            },
            "std_yaw": {
              "type": "number",
              "minimum": 0,
              "default": 0
            }
          },
          "description": "Gaussian noise added to the pose seen by the controller (position; yaw as a rotation about world z); metrics use the true state. The noise belongs to the observed state PUBLICATION (ros_emulated: its 25 Hz publication boundary k; ideal: the tick boundary k): (std_x, std_y, std_yaw) x standard_normal(3) from numpy default_rng(SeedSequence([7301, seed, k])). All three components are always drawn, so conditions that differ only in the stds share the same draws, and a publication seen by two ticks has the same noise."
        }
      }
    },
    "termination": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "enum": [
            "fixed_horizon",
            "path_completion"
          ],
          "default": "fixed_horizon"
        },
        "tube_lat_m": {
          "type": "number",
          "default": 0.1
        },
        "tube_head_rad": {
          "type": "number",
          "default": 0.1
        },
        "divergence_dist_m": {
          "type": "number",
          "default": 5.0,
          "description": "distance from COG to the nearest waypoint"
        },
        "divergence_hold_s": {
          "type": "number",
          "default": 2.0
        },
        "stop_on_divergence": {
          "type": "boolean",
          "default": true
        },
        "completion_margin_s": {
          "type": "number",
          "default": 0.0,
          "description": "path_completion: keep simulating this long after completion"
        }
      }
    },
    "on_controller_failure": {
      "enum": [
        "hold_last_command",
        "terminate"
      ],
      "default": "hold_last_command",
      "description": "after controller_solver_failure / controller_exception / non-finite output the controller is dead (the released ROS node would crash); hold_last_command keeps the last applied command (what the ChROSDriverInputsHandler does) until the horizon."
    },
    "replicate_waypoint_boxes": {
      "type": "boolean",
      "default": false,
      "description": "add the original fixed non-colliding visual waypoint boxes (released_csv only); bitwise no-op, for equivalence tests"
    },
    "replicate_visual_setters": {
      "type": "boolean",
      "default": false
    },
    "tags": {
      "type": "object",
      "description": "free-form metadata copied to the config record"
    },
    "mpc_osqp_adaptive_rho_interval": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "default": 25,
      "description": "OSQP adaptive_rho_interval injected into the released MPC's prob.setup (also for plug-ins calling it). The released code leaves it at 0, which OSQP 0.6 resolves from WALL-CLOCK time (nondeterministic under CPU load). 25 reproduces every archived nominal-sim MPC command exactly and is the deterministic default; null = released time-based behaviour."
    }
  }
}