ebadi / ScenarioGenerator

ScenarioGenerator - Search-based Software Testing of Baidu Apollo in SVL
BSD 3-Clause "New" or "Revised" License
15 stars 12 forks source link

AttributeError: 'Simulation' object has no attribute 'dv' #1

Open MingfeiCheng opened 2 years ago

MingfeiCheng commented 2 years ago

I have a problem after running the start.sh. I am not very familiar with this. Could you please explain the reason of the problem and help me to solve it. Thank you!

Traceback (most recent call last): File "ScenarioGenerator.py", line 88, in random_sim(simulation, des_forward=des_forward, des_right=des_right, steps=steps) File "/home/cmf/apollo/project/ScenarioGenerator-master/modules/basic_minimize.py", line 23, in random_sim simulation.execute(empty_vec, des_forward=des_forward, des_right=des_right, steps=steps) # just to find the number_of_noise File "/home/cmf/apollo/project/ScenarioGenerator-master/Simulation.py", line 279, in execute self.dv.reconnect() AttributeError: 'Simulation' object has no attribute 'dv'

MingfeiCheng commented 2 years ago

I have fixed it, which is a problem of LGSVL-pythonapi.

JasonBourne1998 commented 2 years ago

I have fixed it, which is a problem of LGSVL-pythonapi.

Excus me, I got the same problem, and I think it is caused by the waypoint in the line222 of simulator.py ? Could you plz tell me how to fix it?

MingfeiCheng commented 2 years ago

I have fixed it, which is a problem of LGSVL-pythonapi.

Excus me, I got the same problem, and I think it is caused by the waypoint in the line222 of simulator.py ? Could you plz tell me how to fix it?

I did put the whole error message in this issue. My problem is caused by the code in line 216 - line 220 of Simulator.py.

I fix it by following change: lgsvl.DriveWaypoint(lgsvl.Vector(wp_pos_x, wp_pos_y, wp_pos_z), wp_speed, lgsvl.Vector(wp_angle_x, wp_angle_y, wp_angle_z), 0, False, 0) --> lgsvl.DriveWaypoint(lgsvl.Vector(wp_pos_x, wp_pos_y, wp_pos_z), wp_speed, 0, lgsvl.Vector(wp_angle_x, wp_angle_y, wp_angle_z), 0, False, 0)

ebadi commented 2 years ago

@MingfeiCheng Thanks for the patch #4