You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd let the spawner directly add the new vehicle to the self.vehicles set when step_vehicles is called. It makes this a bit unclear and will let you expect uniform return value rather than this None or some variable mixture.
also you didn't specify the type annotation here getting me to think that we just want this function never return anything in the first place
The type annotation is on the definition of step_vehicles.
step_vehicles returns nothing unless u is a spawner and it spawns a vehicle this timestep. If so, it gives the vehicle to both the downstream road (for kinematics) and back to the parent simulator here so the simulator has a pointer to all vehicles currently in the system.
I don't follow how the spawner would have access to the self.vehicles list?
simulator owns spawner
simulator owns self.vehicles
would i pass self.vehicles to spawner so it can add to it itself?
The text was updated successfully, but these errors were encountered:
https://github.com/spartalab/aimsim/blob/56e9beaeb158b0c045f117e3b44f2c7421879659/aimsim/simulator.py#L317-L327
Per discussion here: #2 (comment)
@ribsthakkar
@CarlinLiao
The text was updated successfully, but these errors were encountered: