5 from OpenHRP.StateHolderServicePackage
import CommandHolder
10 if len(linkinfo.ulimit) > 0:
11 self.
maxDeg = linkinfo.ulimit[0]*180/math.pi
14 if len(linkinfo.llimit) > 0:
15 self.
minDeg = linkinfo.llimit[0]*180/math.pi
20 nameLabel = JLabel(linkinfo.name+
":")
21 nameLabel.setPreferredSize(Dimension(150, 15));
23 self.add(JLabel(
"%4.0f"%self.
minDeg))
26 self.add(JLabel(
"%4.0f"%self.
maxDeg))
31 txt = self.text.getText()
35 self.text.setText(str(angDeg))
38 self.text.setText(str(angDeg))
39 self.slider.setValue(int(float(angDeg)))
42 angDeg = self.slider.getValue()
43 self.text.setText(str(angDeg))
46 self.slider.setValue(int(angle))
49 delta = abs(self.
angle - target)
55 self.seq.waitInterpolation()
56 self.seq.setJointAngle(self.
name, target*math.pi/180, tm)
65 for li
in self.bodyInfo.links():
69 self.setSize(550, 800)
73 panel.setLayout(BorderLayout())
75 sPane.setSize(400,720)
76 jointsPanel = JPanel()
77 jointsPanel.setLayout(BoxLayout(jointsPanel,
79 command = CommandHolder()
80 self.sh.getCommand(command)
81 jav = command.value.jointRefs
83 for li
in self.bodyInfo.links():
85 jp =
jointPanel(li, seq, jav[li.jointId]*180/math.pi)
86 self.jpanels.append(jp)
88 sPane.add(jointsPanel)
89 panel.add(sPane, BorderLayout.NORTH)
90 commandPanel = JPanel()
91 commandPanel.add(JButton(
"get pose", actionPerformed=self.
getPose))
92 panel.add(commandPanel, BorderLayout.SOUTH)
97 command = CommandHolder()
98 self.sh.getCommand(command)
99 jav = command.value.jointRefs
101 jp.setCurrentAngle(jav[jp.jointId]*180/math.pi)
def setAngleSlider(self, event)
def setTargetAngle(self, target)
def __init__(self, linkinfo, seq, angle)
def setCurrentAngle(self, angle)
def findModelLoader(rnc=None)
def setAngleText(self, event)
def __init__(self, url, seq, sh)