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
Humanoid Path Planner
hpp-practicals
Commits
b53d2618
Commit
b53d2618
authored
Mar 08, 2018
by
Florent Lamiraux
Committed by
Florent Lamiraux florent@laas.fr
Mar 09, 2018
Browse files
Update scripts: initialize graph after setting pathvalidation.
parent
aeced09f
Changes
2
Hide whitespace changes
Inline
Side-by-side
script/grasp_ball.py
View file @
b53d2618
...
...
@@ -35,10 +35,13 @@ graph.createEdge ('grasp', 'placement', 'release-ball', 1, 'grasp')
## Create transformation constraint : ball is in horizontal plane with free
## rotation around z
ps
.
createTransformationConstraint
(
'placement'
,
''
,
ballName
,
[
0
,
0
,
0.025
,
0
,
0
,
0
,
1
],
[
False
,
False
,
True
,
True
,
True
,
False
,])
ps
.
createTransformationConstraint
(
'placement'
,
''
,
ballName
,
[
0
,
0
,
0.025
,
0
,
0
,
0
,
1
],
[
False
,
False
,
True
,
True
,
True
,
False
,])
# Create complement constraint
ps
.
createTransformationConstraint
(
'placement/complement'
,
''
,
ballName
,
[
0
,
0
,
0.025
,
0
,
0
,
0
,
1
],
[
True
,
True
,
False
,
False
,
False
,
True
,])
ps
.
createTransformationConstraint
(
'placement/complement'
,
''
,
ballName
,
[
0
,
0
,
0.025
,
0
,
0
,
0
,
1
],
[
True
,
True
,
False
,
False
,
False
,
True
,])
ps
.
setConstantRightHandSide
(
'placement'
,
True
)
ps
.
setConstantRightHandSide
(
'placement/complement'
,
False
)
...
...
@@ -55,6 +58,8 @@ graph.setConstraints (edge='grasp-ball', constraints = \
# These edges are in node 'grasp'
graph
.
setConstraints
(
edge
=
'transfer'
,
constraints
=
Constraints
())
graph
.
setConstraints
(
edge
=
'release-ball'
,
constraints
=
Constraints
())
ps
.
selectPathValidation
(
"Dichotomy"
,
0
)
ps
.
selectPathProjector
(
"Progressive"
,
0.1
)
graph
.
initialize
()
## Project initial configuration on state 'placement'
...
...
@@ -68,8 +73,6 @@ res, q_goal, error = graph.applyNodeConstraints ('placement', q2)
## Define manipulation planning problem
ps
.
setInitialConfig
(
q_init
)
ps
.
addGoalConfig
(
q_goal
)
ps
.
selectPathValidation
(
"Dichotomy"
,
0
)
ps
.
selectPathProjector
(
"Progressive"
,
0.1
)
pp
=
PathPlayer
(
r
,
ps
.
client
.
basic
)
...
...
script/grasp_ball_in_box.py
View file @
b53d2618
...
...
@@ -24,6 +24,8 @@ r (q1)
graph
=
ConstraintGraph
(
robot
,
'graph'
)
ps
.
selectPathValidation
(
"Discretized"
,
0.01
)
ps
.
selectPathProjector
(
"Progressive"
,
0.1
)
graph
.
initialize
()
res
,
q_init
,
error
=
graph
.
applyNodeConstraints
(
'placement'
,
q1
)
...
...
@@ -34,8 +36,6 @@ res, q_goal, error = graph.applyNodeConstraints ('placement', q2)
ps
.
setInitialConfig
(
q_init
)
ps
.
addGoalConfig
(
q_goal
)
ps
.
selectPathValidation
(
"Discretized"
,
0.01
)
ps
.
selectPathProjector
(
"Progressive"
,
0.1
)
pp
=
PathPlayer
(
ps
.
client
.
basic
,
r
)
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