Skip to content
GitLab
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
sot-hpp
Commits
bae0523d
Commit
bae0523d
authored
Mar 28, 2018
by
Joseph Mirabel
Committed by
Joseph Mirabel
Mar 28, 2018
Browse files
Remove useless functions.
parent
4a11d0d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
sot_hpp/factory.py
View file @
bae0523d
from
hpp.corbaserver.manipulation.constraint_graph_factory
import
ConstraintFactoryAbstract
,
GraphFactoryAbstract
from
tools
import
Manifold
,
Grasp
,
idx
,
idx_zip
,
OpFrame
,
EEPosture
from
tools
import
Manifold
,
Grasp
,
OpFrame
,
EEPosture
from
dynamic_graph.sot.core
import
SOT
class
Affordance
(
object
):
...
...
@@ -94,7 +94,7 @@ class Factory(GraphFactoryAbstract):
objectsAlreadyGrasped
=
{}
for
ig
,
ih
in
idx_zip
(
grasps
):
for
ig
,
ih
in
enumerate
(
grasps
):
if
ih
is
not
None
:
# Add task gripper_close
self
.
manifold
+=
tasks
.
g
(
factory
.
grippers
[
ig
],
factory
.
handles
[
ih
],
'gripper_close'
)
...
...
@@ -140,8 +140,8 @@ class Factory(GraphFactoryAbstract):
def
setupFrames
(
self
,
hppclient
,
sotrobot
):
self
.
sotrobot
=
sotrobot
self
.
grippersIdx
=
{
self
.
grippers
[
i
]
:
i
for
i
in
idx
(
self
.
grippers
)
}
self
.
handlesIdx
=
{
self
.
handles
[
i
]
:
i
for
i
in
idx
(
self
.
handles
)
}
self
.
grippersIdx
=
{
g
:
i
for
i
,
g
in
enumerate
(
self
.
grippers
)
}
self
.
handlesIdx
=
{
h
:
i
for
i
,
h
in
enumerate
(
self
.
handles
)
}
self
.
gripperFrames
=
{
g
:
OpFrame
(
hppclient
)
for
g
in
self
.
grippers
}
self
.
handleFrames
=
{
h
:
OpFrame
(
hppclient
)
for
h
in
self
.
handles
}
...
...
sot_hpp/supervisor.py
View file @
bae0523d
from
tools
import
Grasp
,
OpFrame
,
Manifold
,
Posture
,
idx
,
idx_zip
from
tools
import
Manifold
,
Posture
from
dynamic_graph.sot.core
import
SOT
from
dynamic_graph
import
plug
...
...
sot_hpp/tools.py
View file @
bae0523d
...
...
@@ -5,9 +5,6 @@ from dynamic_graph.sot.core.meta_task_posture import MetaTaskKinePosture
from
dynamic_graph.sot.core.meta_tasks
import
setGain
from
dynamic_graph.sot.core
import
FeaturePosture
def
idx
(
l
):
return
range
(
len
(
l
))
def
idx_zip
(
l
):
return
zip
(
idx
(
l
),
l
)
def
parseHppName
(
hppjointname
):
if
hppjointname
==
"universe"
:
return
""
,
"universe"
return
hppjointname
.
split
(
'/'
,
1
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment