igibson.render package¶
Subpackages¶
- igibson.render.mesh_renderer package
- Submodules
- igibson.render.mesh_renderer.get_available_devices module
- igibson.render.mesh_renderer.instances module
- igibson.render.mesh_renderer.materials module
- igibson.render.mesh_renderer.mesh_renderer_cpu module
- igibson.render.mesh_renderer.mesh_renderer_settings module
- igibson.render.mesh_renderer.mesh_renderer_tensor module
- igibson.render.mesh_renderer.visual_object module
- Module contents
Submodules¶
igibson.render.profiler module¶
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
-
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
-