StanfordVL / GibsonEnv

Gibson Environments: Real-World Perception for Embodied Agents
http://gibsonenv.stanford.edu/
MIT License
865 stars 146 forks source link

Randomize initial robot position #56

Open francis-lewis opened 6 years ago

francis-lewis commented 6 years ago

Is there a way to randomize the initial robot position that respects the constraints of the environment?

When I enable random initial position, it currently seems to spawn the robot into walls, outside the environment, etc.

fxia22 commented 6 years ago

I think you can use the floorplan generated in #49 to inform your spawning. You can get a few cross sections at different heights of the robot and then make sure the footprint of the robot doesn't overlap with the obstacles.

francis-lewis commented 6 years ago

Thanks Fei! The floorplan generation is useful to know :) I'm thinking of doing collision checking before starting an episode as a short-term hack. Is leveraging the floorplan for constrained randomization part of the development roadmap, or would it be worthwhile to develop a personal solution?

fxia22 commented 6 years ago

@glewis17 Leveraging the floorplan and collision check at the beginning of the episode are definitely in the development roadmap. If you are going to do something in this direction, a pull request will be much appreciated!

hzyjerry commented 6 years ago

@glewis17 you can also use the navigation scenarios generated here

For every building model, we generated 100 practical navigation scenarios, with their initial&target locations and waypoints. You can randomize robot location using these scenarios.