8000 Obtain and save the current joint angles for the selected robot when … · hzyjerry/robotics-toolbox-python@70d9601 · GitHub
[go: up one dir, main page]

Skip to content

Commit 70d9601

Browse files
committed
Obtain and save the current joint angles for the selected robot when the teachpanel is switched to from canvas controls menu.
1 parent 9d2cb78 commit 70d9601

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

roboticstoolbox/backends/VPython/canvas.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,11 @@ def __setup_joint_sliders(self):
604604
"""
605605
Display the Teachpanel mode of the UI
606606
"""
607+
608+
# Update the robots to their current joint angles
609+
for joint_idx, joint in enumerate(self.__teachpanel[self.__selected_robot]):
610+
joint[self.__idx_theta] = self.__robots[self.__selected_robot].angles[joint_idx]
611+
607612
self.scene.append_to_caption('\n')
608613
if len(self.__teachpanel) == 0:
609614
self.scene.append_to_caption("No robots available\n")

0 commit comments

Comments
 (0)
0