File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 5
5
import time
6
6
import threading
7
7
import warnings
8
+ import matplotlib .pyplot as plt
8
9
from matplotlib .figure import Figure
9
10
from matplotlib .backends .backend_qtagg import FigureCanvasQTAgg
10
11
from matplotlib .pyplot import Circle
@@ -126,6 +127,7 @@ def __init__(
126
127
self .fig = Figure (dpi = dpi , tight_layout = True )
127
128
self .axes = self .fig .add_subplot (111 )
128
129
super (WorldCanvas , self ).__init__ (self .fig )
130
+ plt .ion ()
129
131
130
132
self .main_window = main_window
131
133
self .world = world
@@ -417,14 +419,13 @@ def nav_animation_callback(self):
417
419
# Check if any robot is currently navigating.
418
420
nav_status = [robot .is_moving () for robot in world .robots ]
419
421
if any (nav_status ):
420
- self .update_robots_plot ()
421
-
422
422
# Show the state of the currently selected robot
423
423
cur_robot = world .gui .get_current_robot ()
424
424
if cur_robot is not None and cur_robot .is_moving ():
425
425
self .show_world_state (cur_robot )
426
426
world .gui .set_buttons_during_action (False )
427
427
428
+ self .update_robots_plot ()
428
429
self .draw_and_sleep ()
429
430
430
431
def update_robots_plot (self ):
You can’t perform that action at this time.
0 commit comments