igibson.render package

Submodules

igibson.render.profiler module

class igibson.render.profiler.Profiler(name, logger=None, level=20, enable=True)

Bases: object

A simple profiler for logging and debugging

step(name)

Returns the duration since last step/start

summarize_step(start, level=None)

Summarize the step duration and fps

igibson.render.viewer module

class igibson.render.viewer.Viewer(initial_pos=[0, 0, 1.2], initial_view_direction=[1, 0, 0], initial_up=[0, 0, 1], simulator=None, renderer=None, min_cam_z=- 1000000.0)

Bases: object

apply_push_force(x, y, force)

Apply pushing force to a 3D point. Given a pixel location (x, y), compute the 3D location of that point, and then apply a virtual force of a given magnitude towards the negative surface normal at that point

Parameters
  • x – image pixel x coordinate

  • y – image pixel y coordinate

  • force – force magnitude

create_constraint(x, y, fixed=False)

Create a constraint between the constraint marker and the object at pixel location (x, y). This is used for human users’ mouse interaction with the objects in the scenes.

Parameters
  • x – image pixel x coordinate

  • y – image pixel y coordinate

  • fixed – whether to create a fixed joint. Otherwise, it’s a point2point joint.

create_visual_object()

Create visual objects to visualize interaction

get_hit(x, y)

Shoot a ray through pixel location (x, y) and returns the position and normal that this ray hits

Parameters
  • x – image pixel x coordinate

  • y – image pixel y coordinate

monitor_constraint_violation()
mouse_callback(event, x, y, flags, params)

Mouse callback that handles all the mouse events

Parameters
  • event – OpenCV mouse event

  • x – image pixel x coordinate

  • y – image pixel y coordinate

  • flags – any relevant flags passed by OpenCV.

  • params – any extra parameters supplied by OpenCV

move_constraint(x, y)

Move the constraint marker (when the mouse is moved during interaction)

Parameters
  • x – image pixel x coordinate

  • y – image pixel y coordinate

move_constraint_z(dy)

Move the constraint marker closer or further away from the camera (when the mouse is moved during interaction)

Parameters

dy – delta y coordinate in the pixel space

remove_constraint()

Remove constraints created by create_constraint

setup_motion_planner(planner=None)

Store the motion planner that is passed in

Parameters

planner – motion planner

show_help_text(frame)

Show help text

update()

Update images of Viewer

class igibson.render.viewer.ViewerSimple(simulator=None, renderer=None)

Bases: object

Viewer class that just renders - V and P matrices are updated using the VRLogger.

update()
class igibson.render.viewer.ViewerVR(use_companion_window, frame_save_path=None)

Bases: object

update()

Updates viewer.

Module contents