Download code/case1/runner/schemas/episode_config.schema.json from harryzhang1018/TestRandomization: direct link, hf CLI and curl.
- Browser
- Download file 12.2 kB
-
https://huggingface.co/datasets/harryzhang1018/TestRandomization/resolve/main/code/case1/runner/schemas/episode_config.schema.json
- Command line
-
hf download hf://datasets/harryzhang1018/TestRandomization/code/case1/runner/schemas/episode_config.schema.json
-
curl -L -o episode_config.schema.json https://huggingface.co/datasets/harryzhang1018/TestRandomization/resolve/main/code/case1/runner/schemas/episode_config.schema.json
12.2 kB
| { | |
| "$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." | |
| } | |
| } | |
| } |