Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Observations and Actions spaces #2

Closed
MichalBortkiewicz opened this issue Jul 14, 2022 · 2 comments
Closed

Observations and Actions spaces #2

MichalBortkiewicz opened this issue Jul 14, 2022 · 2 comments

Comments

@MichalBortkiewicz
Copy link

Hi!
First of all - great repo, code, and paper. I am just starting my adventure with HRL and probably this is the best-structured repo I've seen so far.

The only issue I have is the interpretation of observation and action spaces - where can I find the documentation of the vector elements?

@jgehring
Copy link
Contributor

Thanks for the kind words!

Feature names (for proprioceptive features) are provided by the bipedal-skills featurizers, and actuator names can be queried from the dm_control Physics instance like so:

>>> import bisk
>>> import gym
>>> env = gym.make('BiskHurdlesWalker-v1')
>>> env.observation_space
Dict(next_hurdle:Box(-inf, inf, (3,), float32), observation:Box(-inf, inf, (60,), float32))
>>> env.featurizer.feature_names()
['rootz:p', 'rootx:p', 'rooty:p', 'right_hip:p', 'right_knee:p', 'right_ankle:p', 'left_hip:p', 'left_knee:p', 'left_ankle:p', 'rootz:v', 'rootx:v', 'rooty:v', 'right_hip:v', 'right_knee:v', 'right_ankle:v', 'left_hip:v', 'left_knee:v', 'left_ankle:v', 'torso:crx', 'torso:cry', 'torso:crz', 'torso:ctx', 'torso:cty', 'torso:ctz', 'right_thigh:crx', 'right_thigh:cry', 'right_thigh:crz', 'right_thigh:ctx', 'right_thigh:cty', 'right_thigh:ctz', 'right_leg:crx', 'right_leg:cry', 'right_leg:crz', 'right_leg:ctx', 'right_leg:cty', 'right_leg:ctz', 'right_foot:crx', 'right_foot:cry', 'right_foot:crz', 'right_foot:ctx', 'right_foot:cty', 'right_foot:ctz', 'left_thigh:crx', 'left_thigh:cry', 'left_thigh:crz', 'left_thigh:ctx', 'left_thigh:cty', 'left_thigh:ctz', 'left_leg:crx', 'left_leg:cry', 'left_leg:crz', 'left_leg:ctx', 'left_leg:cty', 'left_leg:ctz', 'left_foot:crx', 'left_foot:cry', 'left_foot:crz', 'left_foot:ctx', 'left_foot:cty', 'left_foot:ctz']
>>> env.p.named.model.actuator_gear
FieldIndexer(actuator_gear):
0   robot/right_hip [ 100       0         0         0         0         0       ]
1  robot/right_knee [ 50        0         0         0         0         0       ]
2 robot/right_ankle [ 20        0         0         0         0         0       ]
3    robot/left_hip [ 100       0         0         0         0         0       ]
4   robot/left_knee [ 50        0         0         0         0         0       ]
5  robot/left_ankle [ 20        0         0         0         0         0       ]

The feature names are a bit cryptic, but :p stands for joint position, :v for joint velocity and :c[tr][xyz] for external forces (such as contact with the floor).

@MichalBortkiewicz
Copy link
Author

@jgehring thanks a lot!

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

No branches or pull requests

2 participants