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.
Redraws the figure and waits a small amount of time.
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.
Queues up drawing when needed.
show()Displays all entities in the world (robots, rooms, objects, etc.).
Draws hallways in the world.
Draws locations and object spawns in the world.
Draws objects and their associated texts.
show_planner_and_path([robot, show_graphs, path])Plot the path planner and latest path, if specified.
Draws robots, along with any associated sensors.
Draws rooms in the world.
show_world_state([robot])Shows the world state in the figure title.
Shows/hides collision polygons.
Shows/hides location names.
Shows/hides object names.
Shows/hides robot names.
Shows/hides room names.
update_object_plot(obj)Updates an object visualization based on its pose.
Updates the robot visualization graphics objects.
Attributes
Lock for drawing on the canvas in a thread-safe manner.
Signal for drawing without threading errors.
Signal for starting a navigation task without threading errors.
Multiplier of robot radius for plotting robot orientation lines.
zorder for robot visualization.
Signal for showing hallways without threading errors.
Signal for showing locations without threading errors.
Signal for showing objects without threading errors.
Signal for showing planners and paths without threading errors.
Signal for showing robots without threading errors.