for veh_id in self.ids:
prev_pos = self.get_x_by_id(veh_id)
self.vehicles[veh_id]["type"] = self.traci_connection.vehicle.getTypeID(veh_id)
this_edge = self.traci_connection.vehicle.getRoadID(veh_id)
if this_edge is None:
print("Null edge for vehicle:", veh_id)
else:
After Change
except ValueError:
self.vehicles[veh_id]["absolute_position"] = -1001
if self.vehicles[veh_id]["position"] < 0 or self.vehicles[veh_id]["speed"] < 0:
print("Traci is returning error codes for some of your values", veh_id)
sumo_crash = True