igibson.tasks package

Submodules

igibson.tasks.dynamic_nav_random_task module

class igibson.tasks.dynamic_nav_random_task.DynamicNavRandomTask(env)

Bases: igibson.tasks.point_nav_random_task.PointNavRandomTask

Dynamic Navigation Random Task The goal is to navigate to a random goal position, in the presence of dynamic objects

load_dynamic_objects(env)

Load dynamic objects (Turtlebots)

Parameters

env – environment instance

Returns

a list of interactive objects

reset_dynamic_objects(env)

Reset the poses of dynamic objects to have no collisions with the scene or the robot

Parameters

env – environment instance

reset_scene(env)

Task-specific scene reset: reset the dynamic objects after scene and agent reset

Parameters

env – environment instance

step(env)

Perform task-specific step: move the dynamic objects with action repeat

Parameters

env – environment instance

igibson.tasks.interactive_nav_random_task module

class igibson.tasks.interactive_nav_random_task.InteractiveNavRandomTask(env)

Bases: igibson.tasks.point_nav_random_task.PointNavRandomTask

Interactive Navigation Random Task The goal is to navigate to a random goal position, in the presence of interactive objects that are small and light

load_interactive_objects(env)

Load interactive objects (YCB objects)

Parameters

env – environment instance

Returns

a list of interactive objects

reset_interactive_objects(env)

Reset the poses of interactive objects to have no collisions with the scene or the robot

Parameters

env – environment instance

reset_scene(env)

Task-specific scene reset: reset the interactive objects after scene and agent reset

Parameters

env – environment instance

igibson.tasks.point_nav_fixed_task module

class igibson.tasks.point_nav_fixed_task.PointNavFixedTask(env)

Bases: igibson.tasks.task_base.BaseTask

Point Nav Fixed Task The goal is to navigate to a fixed goal position

get_geodesic_potential(env)

Get potential based on geodesic distance

Parameters

env – environment instance

Returns

geodesic distance to the target position

get_l2_potential(env)

Get potential based on L2 distance

Parameters

env – environment instance

Returns

L2 distance to the target position

get_potential(env)

Compute task-specific potential: distance to the goal

Parameters

env – environment instance

Returns

task potential

get_shortest_path(env, from_initial_pos=False, entire_path=False)

Get the shortest path and geodesic distance from the robot or the initial position to the target position

Parameters
  • env – environment instance

  • from_initial_pos – whether source is initial position rather than current position

  • entire_path – whether to return the entire shortest path

Returns

shortest path and geodesic distance to the target position

get_task_obs(env)

Get task-specific observation, including goal position, current velocities, etc.

Parameters

env – environment instance

Returns

task-specific observation

get_termination(env, collision_links=[], action=None, info={})

Aggreate termination conditions and fill info

global_to_local(env, pos)

Convert a 3D point in global frame to agent’s local frame

Parameters
  • env – environment instance

  • pos – a 3D point in global frame

Returns

the same 3D point in agent’s local frame

load_visualization(env)

Load visualization, such as initial and target position, shortest path, etc

Parameters

env – environment instance

reset_agent(env)

Task-specific agent reset: land the robot to initial pose, compute initial potential

Parameters

env – environment instance

reset_scene(env)

Task-specific scene reset: reset scene objects or floor plane

Parameters

env – environment instance

step(env)

Perform task-specific step: step visualization and aggregate path length

Parameters

env – environment instance

step_visualization(env)

Step visualization

Parameters

env – environment instance

igibson.tasks.point_nav_random_task module

class igibson.tasks.point_nav_random_task.PointNavRandomTask(env)

Bases: igibson.tasks.point_nav_fixed_task.PointNavFixedTask

Point Nav Random Task The goal is to navigate to a random goal position

reset_agent(env)

Reset robot initial pose. Sample initial pose and target position, check validity, and land it.

Parameters

env – environment instance

reset_scene(env)

Task-specific scene reset: get a random floor number first

Parameters

env – environment instance

sample_initial_pose_and_target_pos(env)

Sample robot initial pose and target position

Parameters

env – environment instance

Returns

initial pose and target position

igibson.tasks.reaching_random_task module

class igibson.tasks.reaching_random_task.ReachingRandomTask(env)

Bases: igibson.tasks.point_nav_random_task.PointNavRandomTask

Reaching Random Task The goal is to reach a random goal position with the robot’s end effector

get_l2_potential(env)

L2 distance to the goal

Parameters

env – environment instance

Returns

potential based on L2 distance to goal

get_potential(env)

Compute task-specific potential: distance to the goal

Parameters

env – environment instance

Returns

task potential

get_task_obs(env)

Get task-specific observation, including goal position, end effector position, etc.

Parameters

env – environment instance

Returns

task-specific observation

sample_initial_pose_and_target_pos(env)

Sample robot initial pose and target position

Parameters

env – environment instance

Returns

initial pose and target position

igibson.tasks.room_rearrangement_task module

class igibson.tasks.room_rearrangement_task.RoomRearrangementTask(env)

Bases: igibson.tasks.task_base.BaseTask

Room Rearrangement Task The goal is to close as many furniture (e.g. cabinets and fridges) as possible

get_potential(env)

Compute task-specific potential: furniture joint positions

Parameters

env – environment instance

Param

task potential

get_task_obs(env)

No task-specific observation

reset_agent(env)

Reset robot initial pose. Sample initial pose, check validity, and land it.

Parameters

env – environment instance

reset_scene(env)

Reset all scene objects and then open certain object categories of interest.

Parameters

env – environment instance

sample_initial_pose(env)

Sample robot initial pose

Parameters

env – environment instance

Returns

initial pose

igibson.tasks.task_base module

class igibson.tasks.task_base.BaseTask(env)

Bases: object

Base Task class. Task-specific reset_scene, reset_agent, get_task_obs, step methods are implemented in subclasses Subclasses are expected to populate self.reward_functions and self.termination_conditions

get_reward(env, collision_links=[], action=None, info={})

Aggreate reward functions

Parameters
  • env – environment instance

  • collision_links – collision links after executing action

  • action – the executed action

  • info – additional info

Return reward

total reward of the current timestep

Return info

additional info

abstract get_task_obs(env)

Get task-specific observation

Parameters

env – environment instance

Returns

task-specific observation (numpy array)

get_termination(env, collision_links=[], action=None, info={})

Aggreate termination conditions

Parameters
  • env – environment instance

  • collision_links – collision links after executing action

  • action – the executed action

  • info – additional info

Return done

whether the episode has terminated

Return info

additional info

abstract reset_agent(env)

Task-specific agent reset

Parameters

env – environment instance

abstract reset_scene(env)

Task-specific scene reset

Parameters

env – environment instance

step(env)

Perform task-specific step for every timestep

Parameters

env – environment instance

Module contents