Skip to content

Commit

Permalink
Merge pull request #64 from tawnkramer/Maximellerbach-patch-1
Browse files Browse the repository at this point in the history
cleanup for the previous PR
  • Loading branch information
Maximellerbach authored Apr 15, 2021
2 parents 422505c + b6908b4 commit 459d8c4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions gym_donkeycar/envs/donkey_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,27 +359,22 @@ def on_telemetry(self, data):
self.roll = data["roll"]
self.pitch = data["pitch"]
self.yaw = data["yaw"]
print(self.roll, self.pitch, self.yaw)

# Cross track error not always present.
# Will be missing if path is not setup in the given scene.
# It should be setup in the 4 scenes available now.
if "cte" in data:
self.cte = data["cte"]

if "lidar" in data:
self.lidar = data["lidar"]

# don't update hit once session over
if self.over:
return

self.hit = data["hit"]

try:
self.lidar = data["lidar"]
# logger.info("reading lidar in telemetry package DONE.")
except:
pass
# logger.info("reading lidar in telemetry package FAILED.")

self.determine_episode_over()

def on_cross_start(self, data):
Expand Down

0 comments on commit 459d8c4

Please sign in to comment.