@@ -58,7 +58,7 @@ def test_get_agents(self):
5858 def test_NPC_follow_lane (self ): #Check if NPC can follow lane
5959 with SimConnection () as sim :
6060 state = spawnState (sim )
61- state .position .z -= 5
61+ state .position .x -= 5
6262 sim .add_agent ("Jaguar2015XE (Apollo 3.5)" , lgsvl .AgentType .EGO , state )
6363 agent = self .create_NPC (sim , "Sedan" )
6464 agent .follow_closest_lane (True , 5.6 )
@@ -71,7 +71,7 @@ def test_NPC_follow_lane(self): #Check if NPC can follow lane
7171 def test_rotate_NPC (self ): # Check if NPC can be rotated
7272 with SimConnection () as sim :
7373 state = spawnState (sim )
74- state .position .z -= 5
74+ state .position .x -= 5
7575 sim .add_agent ("Jaguar2015XE (Apollo 3.5)" , lgsvl .AgentType .EGO , state )
7676 agent = self .create_NPC (sim , "SUV" )
7777 self .assertAlmostEqual (agent .state .transform .rotation .y , 0 , places = 3 )
@@ -151,7 +151,7 @@ def test_access_removed_NPC(self): # Check that and exception is raised when try
151151 def test_follow_waypoints (self ): # Check that the NPC can follow waypoints
152152 with SimConnection (60 ) as sim :
153153 state = spawnState (sim )
154- state .position .z -= 5
154+ state .position .x -= 5
155155 sim .add_agent ("Jaguar2015XE (Apollo 3.5)" , lgsvl .AgentType .EGO , state )
156156 spawns = sim .get_spawn ()
157157 sx = spawns [0 ].position .x
@@ -192,16 +192,16 @@ def test_high_waypoint(self): # Check that a NPC will drive to under a high wayp
192192 try :
193193 with SimConnection (15 ) as sim :
194194 state = spawnState (sim )
195- state .position .z -= 5
195+ state .position .x -= 5
196196 sim .add_agent ("Jaguar2015XE (Apollo 3.5)" , lgsvl .AgentType .EGO , state )
197197 spawns = sim .get_spawn ()
198198 sx = spawns [0 ].position .x
199199 sy = spawns [0 ].position .y
200200 sz = spawns [0 ].position .z
201201 agent = self .create_NPC (sim , "Sedan" )
202202
203- px = 12
204- pz = 4
203+ px = 4
204+ pz = 12
205205 py = 5
206206 speed = 6
207207 wp = [lgsvl .DriveWaypoint (lgsvl .Vector (sx - px , sy + py , sz + pz ), speed )]
@@ -217,7 +217,7 @@ def on_waypoint(agent,index):
217217 def test_npc_different_directions (self ): # Check that specified velocities match the NPC's movement
218218 with SimConnection () as sim :
219219 state = spawnState (sim )
220- state .position .z -= 5
220+ state .position .x -= 5
221221 sim .add_agent ("Jaguar2015XE (Apollo 3.5)" , lgsvl .AgentType .EGO , state )
222222 state = spawnState (sim )
223223 state .velocity = lgsvl .Vector (- 10 ,0 ,0 )
@@ -253,7 +253,7 @@ def on_stop_line(agent):
253253 npc .follow_closest_lane (True , 10 )
254254 npc .on_stop_line (on_stop_line )
255255
256- state .position .z -= 5
256+ state .position .x -= 5
257257 sim .add_agent ("Jaguar2015XE (Apollo 3.5)" , lgsvl .AgentType .EGO , state )
258258 sim .run (60 )
259259 self .assertIn ("Waypoint reached" , repr (e .exception ))
0 commit comments