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
Jason Chemin
hpp-rbprm-corba
Commits
171fe0ce
Commit
171fe0ce
authored
Oct 10, 2016
by
Steve Tonneau
Browse files
optimization for ground_crouch
parent
e3ce682a
Changes
1
Hide whitespace changes
Inline
Side-by-side
script/scenarios/demos/ground_crouch_hyq_interp.py
View file @
171fe0ce
...
...
@@ -118,8 +118,6 @@ def act(i, numOptim = 0, use_window = 0, friction = 0.5, optim_effectors = True,
return
step
(
fullBody
,
configs
,
i
,
numOptim
,
pp
,
limbsCOMConstraints
,
friction
,
optim_effectors
=
optim_effectors
,
time_scale
=
time_scale
,
useCOMConstraints
=
False
,
use_window
=
use_window
,
verbose
=
verbose
,
draw
=
draw
,
trackedEffectors
=
trackedEffectors
)
def
play
(
frame_rate
=
1.
/
24.
):
play_traj
(
fullBody
,
pp
,
frame_rate
)
#~ for i in range(6,25):
#~ act(i, 60, optim_effectors = True)
...
...
@@ -176,6 +174,18 @@ def contactPlan():
r
(
configs
[
i
]);
time
.
sleep
(
0.5
)
def
interpolate
():
tp
.
cl
.
problem
.
selectProblem
(
"default"
)
r
.
client
.
gui
.
setVisibility
(
"hyq"
,
"ON"
)
tp
.
r
.
client
.
gui
.
setVisibility
(
"toto"
,
"OFF"
)
tp
.
r
.
client
.
gui
.
setVisibility
(
"hyq_trunk"
,
"OFF"
)
for
i
in
range
(
7
,
20
):
act
(
i
,
1
,
optim_effectors
=
True
)
def
play
(
frame_rate
=
1.
/
24.
):
play_traj
(
fullBody
,
pp
,
frame_rate
)
def
a
():
print
"initial configuration"
...
...
@@ -196,6 +206,14 @@ def d():
def
e
():
print
"displaying contact plan"
contactPlan
()
def
f
():
print
"computing feasible com trajectory"
interpolate
()
def
g
():
print
"playing feasible trajectory"
play
()
print
"Root path generated in "
+
str
(
tp
.
t
)
+
" ms."
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