rodrigoqueiroz / geoscenarioserver

8 stars 1 forks source link

Btree organization #50

Closed WAEliasmith closed 3 years ago

WAEliasmith commented 3 years ago

This PR copies the btree files and organises them by pedestrian or vehicle btrees. This will help for -b searching in the future.

Should the pedestrian drive be renamed to walk?

Main Testing: Test gs_ringoad_modified_with_ego:

$ python3.8 $HOME/anm_unreal_sim/submodules/geoscenarioserver/GSServer.py --scenario $HOME/anm_unreal_sim/submodules/geoscenarioserver/scenarios/anm_scenarios/gs_ringroad_modified_with_ego.osm --map-path $HOME/anm_unreal_sim/submodules/geoscenarioserver/scenarios
...
File "$HOME/anm_unreal_sim/submodules/geoscenarioserver/ScenarioSetup.py", line 72, in load_geoscenario_from_file
    ego_vehicle = RV(99, 'Ego', [0.0,0.0,0.0, 0.0,0.0,0.0])
NameError: name 'RV' is not defined

(similar error for paperversion) Test base_eval_scenario769:

$ python3.8 $HOME/anm_unreal_sim/submodules/geoscenarioserver/GSServer.py --scenario $HOME/anm_unreal_sim/submodules/geoscenarioserver/scenarios/eval_scenarios/base_eval_scenario_769.osm --map-path $HOME/anm_unreal_sim/submodules/geoscenarioserver/scenarios

*runs an intersection with no vehicles, but lights change successfully

Experimental_maps testing: Test gn_gs.osm: have to remove maps/ before the lanelet in the osm file

$ python3.8 $HOME/anm_unreal_sim/submodules/geoscenarioserver/GSServer.py --scenario $HOME/anm_unreal_sim/submodules/geoscenarioserver/scenarios/eval_scenarios/gn_gs.osm --map-path $HOME/anm_unreal_sim/submodules/geoscenarioserver/scenarios/maps/experimental_maps/

*server runs but no vehicles move

Test gs_4_crossing_paths_running_red_light: have to remove maps/ before the lanelet in the osm file

$ python3.8 $HOME/anm_unreal_sim/submodules/geoscenarioserver/GSServer.py --scenario /home/ae/anm_unreal_sim/submodules/geoscenarioserver/scenarios/nhtsa_scenarios/gs_4_crossing_paths_running_red_light.osm --map-path /home/ae/anm_unreal_sim/submodules/geoscenarioserver/scenarios/maps/experimental_maps/

*server runs and vid is not moving

Testing gs_18_lane_change_same_direction: have to remove maps/ before the lanelet in the osm file

$ python3.8 $HOME/anm_unreal_sim/submodules/geoscenarioserver/GSServer.py --scenario /home/ae/anm_unreal_sim/submodules/geoscenarioserver/scenarios/nhtsa_scenarios/gs_18_lane_change_same_direction.osm --map-path /home/ae/anm_unreal_sim/submodules/geoscenarioserver/scenarios/maps/experimental_maps/

*starts but v1 and v2 don't move

Early Testing: Pulled wavelab/anm_unreal_test_suite#90 onto anm_unreal_test_suite

$ source /opt/ros/lanelet2/setup.bash
$ python3.8 $HOME/anm_unreal_sim/submodules/geoscenarioserver/GSServer.py --scenario $HOME/anm_unreal_test_suite/scenarios/ring_road_ccw/geoscenarioserver/ring_road_ccw.osm --map-path $HOME/anm_unreal_test_suite/maps

*GSS server runs and 10 VIDs move

Further testing of this code is done on https://github.com/rodrigoqueiroz/geoscenarioserver/pull/51 Better handling of not finding btrees is also done on 51

mantkiew commented 3 years ago

We have to change how the btree_root is used and passed down. For example, in ScenarioSetup.py:132, it only contains the default btree name. I believe it should already contain an absolute path to the resolved btree. That is,

ROOT_DIR/btrees/sdv/<btree name>

But then the problem remains when we're looking for subtrees. Somehow, we have to pass down a new variable btrees_path consisting of ROOT_DIR/btrees/sdv/. Or, we can actually extract the path for searching for subtrees from btree_root using os.path.split. That way we don't have to introduce a new variable. But that won't work in the future when we have multiple search paths.

mantkiew commented 3 years ago

Alex and Michal decided on the following design:

  1. rename btree_root to root_btree_name to better indicate what the variable is used for,
  2. add a new parameter btrees_path, which will be passed down from ScenarioSetup and it'll be used for searching for subtrees.