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

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

Open
rebecajohn opened this issue Aug 17, 2023 · 0 comments

Comments

@rebecajohn
Copy link

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])]


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant