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

Method createDatabase2

limsim/simModel/fixedScene/interReplay.py:101–134  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

99 self.getAllvType()
100
101 def createDatabase2(self):
102 # if database exist then delete it
103 if os.path.exists(self.dataBase2):
104 os.remove(self.dataBase2)
105 conn = sqlite3.connect(self.dataBase2)
106 cur = conn.cursor()
107
108 cur.execute('''CREATE TABLE IF NOT EXISTS simINFO(
109 startTime TIMESTAMP PRIMARY KEY,
110 localPosx REAL,
111 localPosy REAL,
112 radius REAL,
113 egoID TEXT,
114 netBoundary TEXT,
115 description TEXT,
116 note TEXT);''')
117
118 cur.execute('''CREATE TABLE IF NOT EXISTS frameINFO(
119 frame INT NOT NULL,
120 vid TEXT NOT NULL,
121 vtag TEXT NOT NULL,
122 x REAL NOT NULL,
123 y REAL NOT NULL,
124 yaw REAL NOT NULL,
125 speed REAL NOT NULL,
126 accel REAL NOT NULL,
127 laneID TEXT NOT NULL,
128 lanePos REAL NOT NULL,
129 routeIdx INT NOT NULL,
130 PRIMARY KEY (frame, vid));''')
131
132 conn.commit()
133 cur.close()
134 conn.close()
135
136 def simDescriptionCommit(self, simNote: str):
137 netBoundary = ''

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected