mirror of
https://github.com/gryf/coach.git
synced 2025-12-18 11:40:18 +01:00
bug fixes for carla environment (#93)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user