in robogym/wrappers/util.py [0:0]
def observation(self, observation):
new_obs = OrderedDict()
for key, value in observation.items():
new_obs[key] = value
# It's a bit hacky to hard code observation key here but we have to do it now
# because we need to keep old policy backward compatible by keep observation order
# the same.
for goal_key in self.delta.keys():
goal_parts = [goal_key + "_" + part for part in self.goal_parts]
goal = np.concatenate(
[observation[key] for key in goal_parts if key in observation]
)
new_obs[goal_key] = goal
return new_obs