File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
roboticstoolbox/backends/VPython Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -222,8 +222,9 @@ def add_robot(self, robot):
222
222
self .__reload_caption (new_list )
223
223
224
224
# Set it as selected
225
- self .__ui_controls .get ('menu_robots' ).index = \
226
- len (self .__robots ) - 1
225
+ if self .__ui_mode == UImode .CANVASCONTROL :
226
+ self .__ui_controls .get ('menu_robots' ).index = \
227
+ len (self .__robots ) - 1
227
228
228
229
# Place camera based on robots effective radius * 1.25
229
230
if robot .robot is not None :
@@ -604,15 +605,15 @@ def __setup_joint_sliders(self):
604
605
"""
605
606
Display the Teachpanel mode of the UI
606
607
"""
608
+ self .scene .append_to_caption ('\n ' )
609
+ if len (self .__teachpanel ) == 0 :
610
+ self .scene .append_to_caption ("No robots available\n " )
611
+ return
607
612
608
613
# Update the robots to their current joint angles
609
614
for joint_idx , joint in enumerate (self .__teachpanel [self .__selected_robot ]):
610
615
joint [self .__idx_theta ] = self .__robots [self .__selected_robot ].angles [joint_idx ]
611
616
612
- self .scene .append_to_caption ('\n ' )
613
- if len (self .__teachpanel ) == 0 :
614
- self .scene .append_to_caption ("No robots available\n " )
615
- return
616
617
i = 0
617
618
for joint in self .__teachpanel [self .__selected_robot ]:
618
619
if joint [self .__idx_qlim_min ] == joint [self .__idx_qlim_max ]:
You can’t perform that action at this time.
0 commit comments