8000 Fixes the incorrect ui mode equality check · hzyjerry/robotics-toolbox-python@056251a · GitHub
[go: up one dir, main page]

Skip to content

Commit 056251a

Browse files
committed
Fixes the incorrect ui mode equality check
1 parent d177318 commit 056251a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

roboticstoolbox/backends/VPython/VPython.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
close_localhost_session = None
2020

2121
try:
22-
from roboticstoolbox.backends.VPython.canvas import GraphicsCanvas2D, GraphicsCanvas3D
22+
from roboticstoolbox.backends.VPython.canvas import GraphicsCanvas2D, GraphicsCanvas3D, UImode
2323
from roboticstoolbox.backends.VPython.graphicalrobot import GraphicalRobot
2424
from roboticstoolbox.backends.VPython.grid import GridType
2525
except ImportError:
@@ -173,7 +173,7 @@ def step(self, dt=None, id=None, q=None, fig_num=0):
173173
if self.canvases[fig_num].is_robot_in(id):
174174
poses = id.fkine(q)
175175
id.set_joint_poses(poses)
176-
if self.canvases[fig_num].current_mode == 2:
176+
if self.canvases[fig_num].current_mode == UImode.TEACHPANEL:
177177
# Reload the joint sliders
178178
self.canvases[fig_num].teach_mode()
179179

@@ -204,7 +204,7 @@ def step(self, dt=None, id=None, q=None, fig_num=0):
204204
# Set poses of graphical robot
205205
poses = graphical_dh_robot.fkine(q)
206206
graphical_dh_robot.set_joint_poses(poses)
207-
if self.canvases[fig_num].current_mode == 2:
207+
if self.canvases[fig_num].current_mode == UImode.TEACHPANEL:
208208
# Reload the joint sliders
209209
self.canvases[fig_num].teach_mode()
210210

0 commit comments

Comments
 (0)
0