stanfordnmbl / osim-rl

Reinforcement learning environments with musculoskeletal models
http://osim-rl.stanford.edu/
MIT License
894 stars 249 forks source link

something about the state_desc #129

Closed Ailsa1994 closed 6 years ago

Ailsa1994 commented 6 years ago

I want to know the specific meaning of the features of state_desc, where can I get it?

kidzik commented 6 years ago

We are working on describing the details, it'll appear here http://osim-rl.stanford.edu/docs/nips2018/observation/

Frawak commented 6 years ago

The observation is still bit erroneous. The state description (returned by the client.env_step) has only 2 dimensions for the center of mass. The documentation states that there are 3.

Moreover, the get_observation method of the ProstheticsEnv brings up some things: 1) The description:

    # y, vx, vy, ax, ay, rz, vrz, arz of pelvis (8 values)
    # x, y, vx, vy, ax, ay, rz, vrz, arz of head, torso, toes_l, toes_r, talus_l, talus_r (9*6 values)
    # rz, vrz, arz of ankle_l, ankle_r, back, hip_l, hip_r, knee_l, knee_r (7*3 values)
    # activation, fiber_len, fiber_vel for all muscles (3*18)
    # x, y, vx, vy, ax, ay ofg center of mass (6)
    # 8 + 9*6 + 8*3 + 3*18 + 6 = 146

2) The dimensions:

            cur += state_desc["body_pos"][body_part][0:2]
            cur += state_desc["body_vel"][body_part][0:2]
            cur += state_desc["body_acc"][body_part][0:2]

Why are we neglecting an entire dimension - having 2 in a 3D scenario?

kidzik commented 6 years ago

Thanks for reporting. Yes, unfortunately, there is a bug in the center of mass. We will roll out the branch with the full observation of the center of mass. https://github.com/stanfordnmbl/osim-rl/tree/ver2.1

We will also remove the observation vector and keep only the dictionary to avoid confusion. Projection is only an example and there are many issues with that (such as redundant values)

Ailsa1994 commented 6 years ago

So, when changed the center of mass in observation, we have a 160-D observation?

Ailsa1994 commented 6 years ago

In osim.py, there gives a fixed value 158 when describe the observation space, but when changed the center of mass, there should be a 160-d observation, maybe they should be changed together.

kidzik commented 6 years ago

Sorry for the delayed answer. In the next release, we will skip the "projected" observation and only the dictionary will be available. Everyone can then can construct the observation vector on their own. We will provide some examples though (close to what we get now with project=True). All in all, this ambiguity brings more confusion than value, while the dictionary response seems more useful.