Commit 4ec3e82f authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add button to toggle between visual and collision robot bodies

parent c8a7fc1c
......@@ -53,6 +53,11 @@ class CollisionPairs(QtGui.QWidget):
self.pairToRow = dict()
box = QtGui.QVBoxLayout(self)
button = QtGui.QPushButton("Toggle between collision and visual robot bodies", self)
button.checkable = True
button.connect("clicked(bool)", self.toggleVisual)
box.addWidget(button)
button = QtGui.QPushButton(QtGui.QIcon.fromTheme("view-refresh"), "Refresh list", self)
button.connect("clicked()", self.refresh)
box.addWidget(button)
......@@ -161,6 +166,11 @@ class CollisionPairs(QtGui.QWidget):
self.table.sortingEnabled = True
print(time.time() - start_time)
def toggleVisual(self, visual):
rn = self.plugin.client.robot.getRobotName()
for n in self.plugin.gui.gui.getGroupNodeList(rn):
self.plugin.gui.gui.setBoolProperty(n, "ShowVisual", visual)
def writeToFile(self):
_ = _bodyNameToUrdfLinkName
filename = QtGui.QFileDialog.getSaveFileName(self, "SRDF file", "", "SRDF files (*.srdf)")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment