Could you help me on generating a custom scenario please?
Especially is it possible to write an AI prompt for a scenario, e.g., how to simulate sth like the following?
"The ego vehicle is driving on a straight road when a pedestrian suddenly crosses from the right front and stops as the ego vehicle approaches."
I already ran python main.py successfully, but it stops after a short period of time, and from the testcase description there seems to be two vehicles, only one appear in my simulator client (the blue one).
(legend) LeGEND$ python main.py
[[0.43105691 0.11925622]
[0.51194092 0.81998887]
[0.79688955 0.42926683]
[0.92961947 0.31327482]
[0.41127338 0.38581417]
[0.91232472 0.4619262 ]
[0.03978146 0.9370802 ]
[0.40824399 0.13005105]
[0.91565747 0.92064657]
[0.36892204 0.94111465]
[0.41853158 0.46535669]
[0.12087259 0.9164132 ]
[0.3806327 0.89270972]
[0.36795606 0.18780518]
[0.64679082 0.66423906]
[0.14828191 0.21432186]
[0.51015808 0.09656625]
[0.8248963 0.04219725]
[0.30322718 0.11776013]
[0.26413498 0.10962075]]
0 [ 6 11 15 16 17 19]
1 [18]
2 [ 0 7 13]
3 [ 3 4 9 12]
4 [ 2 10]
5 [ 5 1 14]
6 [8]
def testcase(self):
vehicle1 = NPC(lane_id=2, offset=0.131228103185137, initial_speed=38.531054805837044)
vehicle2 = NPC(lane_id=3, offset=11.793838237315796, initial_speed=28.176327565703392)
ego = NPC(lane_id=1, offset=30.0, initial_speed=45.54335320560515)
vehicle1.changeLane(trigger_sequence=1, target_lane=3, target_speed=12.200676954270545)
vehicle1.decelerate(trigger_sequence=2, target_speed=10.052463178108173)
vehicle1.decelerate(trigger_sequence=3, target_speed=0.6957226121292823)
vehicle2.changeLane(trigger_sequence=2, target_lane=1, target_speed=29.44636536456697)
vehicle2.decelerate(trigger_sequence=3, target_speed=0.33210673749139596)
(legend) LeGEND$

I tried also to run evalution but got an error
(legend) LeGEND$ python scripts/run_evaluation.py
[[0.0775452 0.50754299]
[0.83685051 0.30123341]
[0.54478334 0.66204888]
[0.76260328 0.87444357]
[0.54290311 0.85706765]
[0.86207105 0.01135565]
[0.05550138 0.94149734]
[0.95899223 0.83035482]
[0.23459468 0.07217416]
[0.32324072 0.92114194]
[0.07889686 0.92234447]
[0.67769141 0.34580783]
[0.59703561 0.92788816]
[0.14228091 0.41621809]
[0.22759547 0.16744415]
[0.3083763 0.01375891]
[0.06303362 0.18060312]
[0.5777464 0.55936885]
[0.40721336 0.28636503]
[0.45546486 0.33077703]]
0 [ 5 6 8 14 15 16]
1 [ 0 13 18]
2 [10 9 1 19]
3 [ 2 4 11 17]
4 [ 3 7 12]
def testcase(self):
vehicle1 = NPC(lane_id=2, offset=0.131228103185137, initial_speed=38.531054805837044)
vehicle2 = NPC(lane_id=3, offset=11.793838237315796, initial_speed=28.176327565703392)
ego = NPC(lane_id=1, offset=30.0, initial_speed=45.54335320560515)
vehicle1.changeLane(trigger_sequence=1, target_lane=3, target_speed=12.200676954270545)
vehicle1.decelerate(trigger_sequence=2, target_speed=10.052463178108173)
vehicle1.decelerate(trigger_sequence=3, target_speed=0.6957226121292823)
vehicle2.changeLane(trigger_sequence=2, target_lane=1, target_speed=29.44636536456697)
vehicle2.decelerate(trigger_sequence=3, target_speed=0.33210673749139596)
Traceback (most recent call last):
File "/media/m/linux_data/LeGEND/scripts/run_evaluation.py", line 50, in <module>
fuzzer.eval(chrom)
File "/media/m/linux_data/LeGEND/legend/core/algorithm.py", line 60, in eval
chrom.fitness = self.sim.run(chrom.testcase)
File "/media/m/linux_data/LeGEND/legend/core/simulation.py", line 222, in run
self.init_ego()
File "/media/m/linux_data/LeGEND/legend/core/simulation.py", line 158, in init_ego
ego_start_position = self.calculate_position(lane_id=lane_id, offset=offset)
File "/media/m/linux_data/LeGEND/legend/core/simulation.py", line 64, in calculate_position
northing=self.road[lane_id]["central"]["points"][0]['y'],
TypeError: 'NoneType' object is not subscriptable
Process finished with exit code 1
(legend) LeGEND$
Could you help me on generating a custom scenario please?
Especially is it possible to write an AI prompt for a scenario, e.g., how to simulate sth like the following?
"The ego vehicle is driving on a straight road when a pedestrian suddenly crosses from the right front and stops as the ego vehicle approaches."
I already ran python main.py successfully, but it stops after a short period of time, and from the testcase description there seems to be two vehicles, only one appear in my simulator client (the blue one).
I tried also to run evalution but got an error