SocNavEnv: An Environment for Social Navigation
A typical indoor scenario would contain humans moving around, and humans interacting with other humans, or objects such as laptops. So to have all of these, the environment that we are creating consists of the following entities:
- The robot
This was how the environment looked initially, with just simple humans, tables, and a laptop on the table. It required a lot of improvement, but to get started off with classes for humans, robot etc, this was a good start. The environment was written in OpenAI Gym’s style and implemented all the necessary functions that are required by a Gym environment. The green circle represents the robot goal.
The previous environment had the entities placed at fixed coordinates. With random initializations, the environment looks even better, apart from the human motion. Humans were initialized to have a fixed orientation, and once they collide, they were stopped.
Handling human collision
Referring to OpenAI’s multiagent particle environment for handling collisions, collision forces were added. So after adding them to the environment, it looked much better:
Different Room Shapes
Till now, the room was square in shape. Two more shapes rectangular, and L were added. The environment would randomly take shape, and the entities would be placed randomly in them. This is how the L shaped environment looks:
Adding Interactions Between Entities
There are two types of interactions that were added. One is the interactions between humans and humans, and the other is the interaction between humans and laptops. Also, some of the human-human interactions would be stationary, while some of them could be moving. This is how the environment looked with interactions:
Fixing Human motion
The human motion still looks bad, that is just moving in a particular direction, and changing direction once a collision takes place. Humans would have goals now (blue circles), and the goals would be randomly sampled. Human motion was modeled using ORCA (Optimal Reciprocal Collision Avoidance) and SFM (Social Force Model). Humans would randomly use one of the two policies to navigate towards the goal.
Modeling motion of Humans in a Moving Interaction
The motion of humans in a crowd of interacting humans was modeled using ORCA. The crowd would have a goal (red circle), and the humans would move towards the goal. The crowd was treated as a single human and the velocity returned by ORCA policy would be divided among humans. A small Gaussian noise is also added to the velocity for each human so that all humans do not have the same velocity and orientation