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

Clarification on observation dimension #35

Closed
jayaramreddy10 opened this issue Apr 25, 2023 · 1 comment
Closed

Clarification on observation dimension #35

jayaramreddy10 opened this issue Apr 25, 2023 · 1 comment

Comments

@jayaramreddy10
Copy link

When I debug code to get dataset for maze2d:

dataset = SequenceDataset()
batch = batchify(dataset[0])

Goal state in first sample of maze2d dataset =
tensor([[ 0.3114, 0.6512, 0.0737, -0.8078]], device='cuda:0')

Can you please clarify why the state is not just 2 dimensional (x, y), why is it 4 dimensional?

Thanks

@jannerm
Copy link
Owner

jannerm commented Apr 25, 2023

The first two dimensions are positions and then final two are velocities. You can verify this with:

>>> env=gym.make('maze2d-umaze-v0')
>>> env.reset()
array([2.98623863, 3.05874153, 0.08356836, 0.04921324])
>>> env.sim.data.qpos
array([2.98623863, 3.05874153])  ## matches obs[:2]
>>> env.sim.data.qvel
array([0.08356836, 0.04921324])  ## matches obs[2:]

@jannerm jannerm closed this as completed Jun 7, 2023
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

2 participants