1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-18 19:50:17 +01:00

bug fixes for carla environment (#93)

This commit is contained in:
Itai Caspi
2018-04-23 11:13:24 +03:00
committed by GitHub
parent 52eb159f69
commit f31159aad6

View File

@@ -180,7 +180,7 @@ class CarlaEnvironmentWrapper(EnvironmentWrapper):
- np.abs(self.control.steer) * 10 - np.abs(self.control.steer) * 10
# update measurements # update measurements
self.observation = { self.state = {
'observation': sensor_data['CameraRGB'].data, 'observation': sensor_data['CameraRGB'].data,
'measurements': [measurements.player_measurements.forward_speed], 'measurements': [measurements.player_measurements.forward_speed],
} }
@@ -224,9 +224,9 @@ class CarlaEnvironmentWrapper(EnvironmentWrapper):
self.game.start_episode(self.iterator_start_positions) self.game.start_episode(self.iterator_start_positions)
# start the game with some initial speed # start the game with some initial speed
observation = None state = None
for i in range(self.num_speedup_steps): for i in range(self.num_speedup_steps):
observation = self.step([1.0, 0])['observation'] state = self.step([1.0, 0])['state']
self.observation = observation self.state = state
return observation return state