Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix donkey gym bug #1052

Merged
merged 1 commit into from
Oct 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix donkey gym bug
  • Loading branch information
sctse999 committed Oct 18, 2022
commit 1cfd5f93a6f5e71149c0c0afbc0da92e9461aab0
10 changes: 5 additions & 5 deletions donkeycar/templates/complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ def add_simulator(V, cfg):
gym = DonkeyGymEnv(cfg.DONKEY_SIM_PATH, host=cfg.SIM_HOST, env_name=cfg.DONKEY_GYM_ENV_NAME, conf=cfg.GYM_CONF,
record_location=cfg.SIM_RECORD_LOCATION, record_gyroaccel=cfg.SIM_RECORD_GYROACCEL,
record_velocity=cfg.SIM_RECORD_VELOCITY, record_lidar=cfg.SIM_RECORD_LIDAR,
record_distance=cfg.SIM_RECORD_DISTANCE, record_orientation=cfg.SIM_RECORD_ORIENTATION,
# record_distance=cfg.SIM_RECORD_DISTANCE, record_orientation=cfg.SIM_RECORD_ORIENTATION,
delay=cfg.SIM_ARTIFICIAL_LATENCY)
threaded = True
inputs = ['angle', 'throttle']
Expand All @@ -683,10 +683,10 @@ def add_simulator(V, cfg):
outputs += ['vel/vel_x', 'vel/vel_y', 'vel/vel_z']
if cfg.SIM_RECORD_LIDAR:
outputs += ['lidar/dist_array']
if cfg.SIM_RECORD_DISTANCE:
outputs += ['dist/left', 'dist/right']
if cfg.SIM_RECORD_ORIENTATION:
outputs += ['roll', 'pitch', 'yaw']
# if cfg.SIM_RECORD_DISTANCE:
# outputs += ['dist/left', 'dist/right']
# if cfg.SIM_RECORD_ORIENTATION:
# outputs += ['roll', 'pitch', 'yaw']

V.add(gym, inputs=inputs, outputs=outputs, threaded=threaded)

Expand Down