add humanoid and kuka gym environments (experimental)
This commit is contained in:
21
examples/pybullet/gym/humanoidGymEnvTest.py
Normal file
21
examples/pybullet/gym/humanoidGymEnvTest.py
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
from envs.bullet.humanoidGymEnv import HumanoidGymEnv
|
||||
print ("hello")
|
||||
environment = HumanoidGymEnv(renders=True)
|
||||
|
||||
environment._p.setGravity(0,0,0)
|
||||
|
||||
motorsIds=[]
|
||||
for motor in environment._humanoid.motor_names:
|
||||
motorsIds.append(environment._p.addUserDebugParameter(motor,-1,1,0))
|
||||
|
||||
while (True):
|
||||
|
||||
action=[]
|
||||
for motorId in motorsIds:
|
||||
action.append(environment._p.readUserDebugParameter(motorId))
|
||||
|
||||
state, reward, done, info = environment.step(action)
|
||||
obs = environment.getExtendedObservation()
|
||||
print("obs")
|
||||
print(obs)
|
||||
Reference in New Issue
Block a user