Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-rbprm-corba
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Chemin
hpp-rbprm-corba
Commits
8a057f97
Commit
8a057f97
authored
6 years ago
by
Pierre Fernbach
Browse files
Options
Downloads
Patches
Plain Diff
merge tools.py and display_tools.py scripts
parent
4da93bb2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
script/scenarios/sandbox/dynamic/tools.py
+0
-43
0 additions, 43 deletions
script/scenarios/sandbox/dynamic/tools.py
script/tools/display_tools.py
+22
-0
22 additions, 0 deletions
script/tools/display_tools.py
with
22 additions
and
43 deletions
script/scenarios/sandbox/dynamic/tools.py
deleted
100644 → 0
+
0
−
43
View file @
4da93bb2
def
addSphere
(
viewer
,
color
,
pos
,
rotation
=
None
,
name
=
None
,
radius
=
0.01
):
gui
=
viewer
.
client
.
gui
if
name
==
None
:
i
=
0
name
=
'
sphere_
'
+
str
(
i
)
while
name
in
gui
.
getNodeList
():
i
=
i
+
1
name
=
'
sphere_
'
+
str
(
i
)
gui
.
addSphere
(
name
,
radius
,
color
)
gui
.
setVisibility
(
name
,
"
ALWAYS_ON_TOP
"
)
gui
.
addToGroup
(
name
,
viewer
.
sceneName
)
if
len
(
pos
)
==
7
:
rotation
=
pos
[
3
:
7
]
pos
=
pos
[
0
:
3
]
if
rotation
==
None
:
rotation
=
[
1
,
0
,
0
,
0
]
else
:
viewer
.
addLandmark
(
name
,
0.1
)
gui
.
applyConfiguration
(
name
,
pos
+
rotation
)
gui
.
refresh
()
def
moveObject
(
viewer
,
pos
,
rotation
=
[
1
,
0
,
0
,
0
]):
viewer
.
client
.
gui
.
applyConfiguration
(
name
,
pos
+
rotation
)
viewer
.
client
.
gui
.
refresh
()
def
addVector
(
viewer
,
rbprmBuilder
,
color
,
v
,
name
=
None
):
gui
=
viewer
.
client
.
gui
if
name
==
None
:
i
=
0
name
=
'
vector_
'
+
str
(
i
)
while
name
in
gui
.
getNodeList
():
i
=
i
+
1
name
=
'
sphere_
'
+
str
(
i
)
quat
=
rbprmBuilder
.
quaternionFromVector
(
v
[
3
:
6
])
v
[
3
:
7
]
=
quat
[::]
gui
.
addArrow
(
name
,
0.02
,
1
,
color
)
gui
.
addToGroup
(
name
,
viewer
.
sceneName
)
gui
.
setVisibility
(
name
,
"
ON
"
)
gui
.
applyConfiguration
(
name
,
v
)
gui
.
refresh
()
This diff is collapsed.
Click to expand it.
script/tools/display_tools.py
+
22
−
0
View file @
8a057f97
...
@@ -16,3 +16,25 @@ def displayContactSequence(r,configs,pause=1.):
...
@@ -16,3 +16,25 @@ def displayContactSequence(r,configs,pause=1.):
for
i
in
range
(
0
,
len
(
configs
)):
for
i
in
range
(
0
,
len
(
configs
)):
r
(
configs
[
i
])
r
(
configs
[
i
])
time
.
sleep
(
pause
)
time
.
sleep
(
pause
)
def
moveObject
(
viewer
,
pos
,
rotation
=
[
1
,
0
,
0
,
0
]):
viewer
.
client
.
gui
.
applyConfiguration
(
name
,
pos
+
rotation
)
viewer
.
client
.
gui
.
refresh
()
def
addVector
(
viewer
,
rbprmBuilder
,
color
,
v
,
name
=
None
):
gui
=
viewer
.
client
.
gui
if
name
==
None
:
i
=
0
name
=
'
vector_
'
+
str
(
i
)
while
name
in
gui
.
getNodeList
():
i
=
i
+
1
name
=
'
sphere_
'
+
str
(
i
)
quat
=
rbprmBuilder
.
quaternionFromVector
(
v
[
3
:
6
])
v
[
3
:
7
]
=
quat
[::]
gui
.
addArrow
(
name
,
0.02
,
1
,
color
)
gui
.
addToGroup
(
name
,
viewer
.
sceneName
)
gui
.
setVisibility
(
name
,
"
ON
"
)
gui
.
applyConfiguration
(
name
,
v
)
gui
.
refresh
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment