pyrobosim.gui.world_canvas.WorldCanvas

class pyrobosim.gui.world_canvas.WorldCanvas(main_window: PyRoboSimMainWindow, world: World, show: bool = True, options: WorldCanvasOptions = WorldCanvasOptions(dpi=100, animation_dt=0.1, show_collision_polygons=False, show_room_names=True, show_object_names=True, show_location_names=True, show_robot_names=True))

Canvas for rendering a PyRoboSim world as a MatPlotLib figure in an application.

Methods

__init__(main_window, world[, show, options])

Creates an instance of a PyRoboSim figure canvas.

close_location(robot)

Closes the robot's current location, if available.

detect_objects(robot[, query])

Detects objects at the robot's current location.

draw_and_sleep()

Redraws the figure and waits a small amount of time.

nav_animation_callback()

Timer callback function to animate navigating robots.

navigate(robot, goal[, path, realtime_factor])

Starts a thread to navigate a robot to a goal.

open_location(robot)

Opens the robot's current location, if available.

pick_object(robot, obj_name[, grasp_pose])

Picks an object with a specified robot.

place_object(robot[, pose])

Places an object at a specified robot's current location.

queue_draw()

Queues up drawing when needed.

show()

Displays all entities in the world (robots, rooms, objects, etc.).

show_hallways()

Draws hallways in the world.

show_locations()

Draws locations and object spawns in the world.

show_objects()

Draws objects and their associated texts.

show_planner_and_path([robot, show_graphs, path])

Plot the path planner and latest path, if specified.

show_robots()

Draws robots, along with any associated sensors.

show_rooms()

Draws rooms in the world.

show_world_state([robot])

Shows the world state in the figure title.

toggle_collision_polygons()

Shows/hides collision polygons.

toggle_location_names()

Shows/hides location names.

toggle_object_names()

Shows/hides object names.

toggle_robot_names()

Shows/hides robot names.

toggle_room_names()

Shows/hides room names.

update_object_plot(obj)

Updates an object visualization based on its pose.

update_robots_plot()

Updates the robot visualization graphics objects.

Attributes

draw_lock

Lock for drawing on the canvas in a thread-safe manner.

draw_signal

Signal for drawing without threading errors.

navigate_signal

Signal for starting a navigation task without threading errors.

robot_dir_line_factor

Multiplier of robot radius for plotting robot orientation lines.

robot_zorder

zorder for robot visualization.

show_hallways_signal

Signal for showing hallways without threading errors.

show_locations_signal

Signal for showing locations without threading errors.

show_objects_signal

Signal for showing objects without threading errors.

show_planner_and_path_signal

Signal for showing planners and paths without threading errors.

show_robots_signal

Signal for showing robots without threading errors.

staticMetaObject