Closed maxspahn closed 2 years ago
@alxschwrz Verification of observation spaces can be done with the function self.observation_space.contains(self.state)
.
https://github.com/maxspahn/gym_envs_planar/blob/29c4cd93bcf81d931479fa54e1841b039791e767/planarCommon/planarEnv.py#L65-L66
This will include the introduction of polymorphism to unify the definition of acceleration and velocity environments.
@alxschwrz Verification of observation spaces can be done with the function
self.observation_space.contains(self.state)
.
This could also be used for terminating episodes when the limits are reached.
Very nice, would love to assist with this! I think having Dictionaries as observation space will be very beneficial. Seems to me as most StableBaselines3 algorithms also support Dictionaries of the observation space. The action space however should stay as spaces.Box to keep compatibility.
Very nice, would love to assist with this!
Go ahead the branch is online ft-dict-observation.
The only integration missing is on mobileBase robots. This should be feasible through polymorphism, just like for the nLinkReacher. @alxschwrz Can you do it? Let me know if you need help.
Fixed in #28
Currently, all robot state information are concatenated in one numpy.array. For the simplest robots (nLinkReacher, pointRobot), this is sufficient but for more complex robots (groundRobot with differential drive), this can quickly become confusing: In which position do you find what state information. It becomes even trickier when information on obstacles should be returned.
To improve the readability of the code, it would be beneficial to use dictonaries instead for the returned values. In doing so, the observation spaces need to be adapted to the type
Dict
, see https://github.com/openai/gym/blob/master/gym/spaces/dict.py.Here, it might be important to also integrate verification of the returned values and the defined observation space.