Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-gui
Commits
4ec3e82f
Commit
4ec3e82f
authored
May 18, 2017
by
Joseph Mirabel
Committed by
Joseph Mirabel
May 18, 2017
Browse files
Add button to toggle between visual and collision robot bodies
parent
c8a7fc1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyplugins/hpp/gui/collision_pairs.py
View file @
4ec3e82f
...
...
@@ -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)"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment