MCPcopy Create free account
hub / github.com/PJLab-ADG/OASim / getAllvType

Method getAllvType

limsim/simModel/egoTracking/interReplay.py:235–253  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

233 return transformed_points
234
235 def getAllvType(self):
236 conn = sqlite3.connect(self.dataBase)
237 cur = conn.cursor()
238 cur.execute(
239 """SELECT DISTINCT vTypeID, length, width, maxAccel, maxDecel, maxSpeed
240 from vehicleINFO;""")
241
242 dbvTypes = cur.fetchall()
243 for dbvType in dbvTypes:
244 vTypeIns = vehType(dbvType[0])
245 vTypeIns.length = dbvType[1]
246 vTypeIns.width = dbvType[2]
247 vTypeIns.maxAccel = dbvType[3]
248 vTypeIns.maxDecel = dbvType[4]
249 vTypeIns.maxSpeed = dbvType[5]
250 self.allvTypes[dbvType[0]] = vTypeIns
251
252 cur.close()
253 conn.close()
254
255 def dbTrajectory(self, vehid: str, currFrame: int) -> dict:
256 conn = sqlite3.connect(self.dataBase)

Callers 1

__init__Method · 0.95

Calls 1

vehTypeClass · 0.90

Tested by

no test coverage detected