add RacecarGymEnv as a gym experimentation environment

This commit is contained in:
Erwin Coumans
2017-06-08 19:45:48 -07:00
parent 7ee8126d66
commit 0aeb4d5058
6 changed files with 189 additions and 3 deletions

View File

@@ -0,0 +1,14 @@
from envs.bullet.racecarGymEnv import RacecarGymEnv
print ("hello")
environment = RacecarGymEnv(render=True)
targetVelocitySlider = environment._p.addUserDebugParameter("wheelVelocity",-1,1,0)
steeringSlider = environment._p.addUserDebugParameter("steering",-0.5,0.5,0)
while (True):
targetVelocity = environment._p.readUserDebugParameter(targetVelocitySlider)
steeringAngle = environment._p.readUserDebugParameter(steeringSlider)
action=[targetVelocity,steeringAngle]
state, reward, done, info = environment.step(action)