D4RL icon indicating copy to clipboard operation
D4RL copied to clipboard

Why is state value not same as env.sim.get_state().qpos and env.sim.get_state().qvel ?

Open rebecajohn opened this issue 1 year ago • 0 comments

Why is state value not same as env.sim.get_state().qpos and env.sim.get_state().qvel ?

CODE:

import gym import d4rl

env = gym.make('hopper-expert-v2')

state = env.reset() print(state) print("***********************")

Get qpos and qvel

Qpos = [env.sim.get_state().qpos] Qvel = [env.sim.get_state().qvel] print(Qpos) print("") print(Qvel) print("")

Output:

[ 1.24992675e+00 6.55631079e-04 1.55495303e-03 -4.53425491e-03 4.51943952e-03 -1.02679957e-03 -8.93176844e-04 3.55990965e-03 -3.02509415e-03 -4.76351951e-03 6.71493509e-04]


[array([ 2.55533055e-03, 1.24992675e+00, 6.55631079e-04, 1.55495303e-03, -4.53425491e-03, 4.51943952e-03])]


[array([-0.0010268 , -0.00089318, 0.00355991, -0.00302509, -0.00476352, 0.00067149])]


rebecajohn avatar Aug 17 '23 05:08 rebecajohn