guardstrikelab / scenario_runner

Traffic scenario definition and execution engine supporting OpenScenario 2.0
https://carla-scenariorunner.readthedocs.io/en/latest/
MIT License
11 stars 4 forks source link

Implemented parsing of keep statements and struct variables #5

Closed XiaoFei9704 closed 1 year ago

XiaoFei9704 commented 1 year ago

Description

Implemented parsing of keep statements and struct variables. Just like: # 设置速度 speed_a: velocity keep (default speed_a == 30kph) struct weather: fog: fog rain: precipitation struct precipitation: intensity: velocity struct fog: visual_range: length # 设置天气 w: weather keep(w.fog.visual_range == 150m) # 能见度 keep(w.rain.intensity == 10mps) # 降水量 Now the system can correctly recognize the meaning of this sentence. Next, we can call Carla's API to extend the Domain model.

Where has this been tested?

XiaoFei9704 commented 1 year ago

Mainly modified in osc2_scenario.py file