pyrobosim.gui.world_canvas.WorldCanvas

class pyrobosim.gui.world_canvas.WorldCanvas(main_window, world, dpi=100, animation_dt=0.1, realtime_factor=1.0)

Canvas for rendering a pyrobosim world as a matplotlib figure in an application.

Methods

__init__(main_window, world[, dpi, ...])

Creates an instance of a pyrobosim figure canvas.

adjust_text(objs)

Adjust text in a figure.

draw_and_sleep()

Redraws the figure and waits a small amount of time.

get_animated_artists()

Returns a list of artists to animate when blitting.

monitor_nav_animation()

Monitors the navigation animation (to be started in a separate thread).

navigate(robot, goal[, path])

Animates a path to a goal location using a robot's path executor.

navigate_in_thread(robot, goal[, path])

Starts a thread to navigate a robot to a goal.

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.

show()

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

show_planner_and_path([robot, path])

Plot the path planner and latest path, if specified.

show_robots()

Draws robots as circles with heading lines for visualization.

show_world_state([robot, navigating])

Shows the world state in the figure title.

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.

nav_trigger

Signal to trigger navigation method in a thread-safe manner.

object_zorder

zorder for object visualization.

robot_dir_line_factor

Multiplier of robot radius for plotting robot orientation lines.

robot_zorder

zorder for robot visualization.