-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdebug_structs.m
More file actions
27 lines (21 loc) · 829 Bytes
/
debug_structs.m
File metadata and controls
27 lines (21 loc) · 829 Bytes
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
% --- debug_structs.m ---
clear all; clc;
% Add paths and create one of each object type
addpath('lib', 'utils');
scenario = createTestScenario();
assetLib = initAssetLibrary();
vehicles = spawnTraffic(scenario, scenario.spawnPoints(1,:), 1, struct('car',1), []);
assets = placeTestAssets(scenario, assetLib);
% Get the first vehicle and the first asset
one_vehicle = vehicles(1);
one_asset = assets(1);
% Display the field names for comparison
fprintf('--- Vehicle Fields ---\n');
vehicle_fields = fieldnames(one_vehicle)
fprintf('\n--- Asset Fields ---\n');
asset_fields = fieldnames(one_asset)
% Optional: Check nested structs too
fprintf('\n--- Vehicle State Fields ---\n');
vehicle_state_fields = fieldnames(one_vehicle.state)
fprintf('\n--- Asset State Fields ---\n');
asset_state_fields = fieldnames(one_asset.state)