This documentation reflects AI2-THOR version 2.1.0. For the latest AI2-THOR documentation, visit ai2thor.allenai.org.

Agent Navigation

The agent can use these actions to manipulate itself and navigate through the environment.


RotateRight

Rotate the agent by 90 degrees to the right of its current facing

event = controller.step(dict(action='RotateRight'))

RotateLeft

Rotate the agent by 90 degrees to the left of its current facing

event = controller.step(dict(action='RotateLeft'))

LookUp

Angle the agent’s view up in 30 degree increments (max upward angle is 30 degrees above the forward horizon)

event = controller.step(dict(action='LookUp'))

LookDown

Angle the agent’s view down in 30 degree increments (max downward angle is 60 degrees below the forward horizon)

event = controller.step(dict(action='LookDown'))

MoveAhead

Move the agent forward by gridSize.

event = controller.step(dict(action='MoveAhead'))
Parameter Type Description Default
moveMagnitude float Specify move distance and overwrite gridSize value 0.0 (will default to gridSize)

MoveRight

Move the agent right by gridSize (without changing view direction).

event = controller.step(dict(action='MoveRight'))
Parameter Type Description Default
moveMagnitude float Specify move distance and overwrite gridSize value 0.0 (will default to gridSize)

MoveLeft

Move the agent left by gridSize (without changing view direction).

event = controller.step(dict(action='MoveLeft'))
Parameter Type Description Default
moveMagnitude float Specify move distance and overwrite gridSize value 0.0 (will default to gridSize)

MoveBack

Move the agent backward by gridSize (without changing view direction).

event = controller.step(dict(action='MoveBack'))
Parameter Type Description Default
moveMagnitude float Specify move distance and overwrite gridSize value 0.0 (will default to gridSize)

Crouch

Make the Agent crouch, lowering the camera angle. Note this does not change the Agent’s collision, so crouching will not allow the agent to go under things that would block it while standing.

event = controller.step(dict(action='Crouch'))

Stand

Make the Agent Stand if it is currently crouching, returning the Camera position to default.

event = controller.step(dict(action='Stand'))

Teleport

Move the agent to any location in the scene. Using this command it is possible to put the agent into places that would not normally be possible to navigate to, but it can be useful if you need to place an agent in the exact same spot for a task.

controller.step(dict(action='Teleport', x=0.999, y=1.01, z=-0.3541))
Parameter Type Description Default
x float x coordinate in 3D scene space 0.0
y float y coordinate in 3D scene space 0.0
z float z coordinate in 3D scene space 0.0

TeleportFull

Move the agent to any location in the scene. Using this command it is possible to put the agent into places that would not normally be possible to navigate to, but it can be useful if you need to place an agent in the exact same spot for a task. Identical to Telport, but also allows rotation and horizon to be passed in.

event = controller.step(dict(action='TeleportFull', x=0.999, y=1.01, z=-0.3541, rotation=90.0, horizon=30.0))
Parameter Type Description Default
x float x coordinate in 3D scene space 0.0
y float y coordinate in 3D scene space 0.0
z float z coordinate in 3D scene space 0.0
rotation float Rotation about the Y axis to change the forward orientation of the Agent relative to world x/z axes 0.0
horizon float Rotation about the X axis to change the Up/Down look angle of the Agent. Any angle can be used here, but values of -30.0, 0.0, 30.0, 60.0 will mimic the maximum and minimum angles used by the LookUp and LookDown actions 0.0

The horizon angle values describe the rotation about the Agent’s X-Axis. This axis has “right hand” facing with respect to the forward Z-Axis, and because of this the values are slightly misleading as the (-30.0) horizon will actually angle the agent’s forward Z direction 30 degrees upward. Because horizon values describe changes about the X-Axis, positive and negative angles can result in the same end position.

Horizon Angle Value Change in Forward Z
-30.0 (330.0) Look 30 Degrees Up
0.0 Look straight ahead
30.0 Look 30 Degrees Down
60.0 Look 60 Degrees Down

Get Reachable Positions

Returns valid coordinates that the Agent can reach without colliding with the environment or Sim Objects. This can be used in tandem with Teleport to warp the Agent as needed. This is useful for things like randomizing the initial position of the agent without clipping into the environment.

event = controller.step(dict(action='GetReachablePositions'))

Next Steps

Continue on to the Object Interaction documentation for Information about manipulating objects found within the framework.