Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 2.55 KB

README.md

File metadata and controls

49 lines (38 loc) · 2.55 KB

Simulation Framework

Environment

The environment contains n+1 agents. N of them are humans controlled by certain a fixed policy. The other is robot and it's controlled by a trainable policy. The environment is built on top of OpenAI gym library, and has implemented two abstract methods.

  • reset(): the environment will reset positions for all the agents and return observation for robot. Observation for one agent = the observable states of all other agents + the full state of itself.
  • step(action): taking action of the robot as input, the environment computes observation for each agent and call agent.act(observation) to get actions of agents. Then environment detects whether there is a collision between agents. If not, the states of agents will be updated. Then observation, reward, done, info will be returned.

See crowd_sim/envs/crowd_sim.py and crowd_sim/envs/crowd_sim_dict.py for details.

Agent

Agent is a base class, and has two derived class of Human and Robot. Agent class holds all the physical properties of an agent, including position, velocity, orientation, policy, and etc.

  • visibility: humans and robot can be set to be visible or invisible
  • sensor: can be either visual input or coordinate input
  • kinematics: can be either holonomic (move in any direction) or unicycle (has rotation constraints)
  • act(observation): transform observation to state and pass it to policy

See crowd_sim/envs/utils/agent.py for details.

Policy

Policy takes state as input and output an action. Current available policies:

  • ORCA: model other agents as velocity obstacles to find optimal collision-free velocities under reciprocal assumption
  • Social force: models the interactions in crowds using attractive and repulsive forces
  • DS-RNN: our method

See crowd_nav/policy/ for details.

State

There are multiple definition of states in different cases. The state of an agent representing all the knowledge of environments is defined as JointState, and it's different from the state of the whole environment.

  • ObservableState: position, velocity, radius of one agent
  • FullState: position, velocity, radius, goal position, preferred velocity, rotation of one agent
  • JoinState: concatenation of one agent's full state and all other agents' observable states

See crowd_sim/utils/state.py for details.

Action

There are two types of actions depending on what kinematics constraint the agent has.

  • ActionXY: (vx, vy) if kinematics == 'holonomic'
  • ActionRot: (velocity, rotation angle) if kinematics == 'unicycle'

See crowd_sim/utils/action.py for details.