Observation Dictionary to List Function

#1

For my training and executing I use the list instead of the dict, and I didn’t manage to find a provided way to convert the observation dictionary to a list (as it’s required in submission). So I just made my own method for doing so with consistent ordering: https://gist.github.com/Ryan-Amaral/960c291d7cafe928a725f60f36e1f549, hopefully it is of use to someone else.

Was there actually a provided way to do this that I missed? Oh well, it didn’t take too long either way.

2 Likes
#2

Not sure if the order you have would be the same order the assessor server would provide. The gist at [1] is a copy of the same order from the L2M2019Env.get_observations() method.

Links
[1] https://gist.github.com/cmoxiv/a4d1671e28efcf783326755508cbc9ee

#3

It all looks the same to me, I also tested it to make sure the results are the same as using project=True and obs_as_dict=False. Unless I’m missing something, the only difference I can see is the first 3 velocities of the pelvis being divided by self.LENGTH0, not sure what that is. But at the very least your method is much more clean and concise.

#4

FYI, self.LENGTH0 is there to normalize the velocities to model size (i.e. leg length) but is not relevant for the competition as it is set to self.LENGTH0 = 1.

#5

Thanks. Come to think of it, I believe the order does not actually does not matter. In all cases we get the the obstacle_as_dict from which we can pick any filed to use in our controller. It all depends on what we feed to the controller.