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
Fanny Risbourg
sl1m
Commits
619ff3a8
Commit
619ff3a8
authored
Feb 18, 2021
by
Fanny Risbourg
Browse files
export alphas
parent
7587c699
Changes
1
Hide whitespace changes
Inline
Side-by-side
sl1m/planner_l1_generic_2.py
View file @
619ff3a8
...
...
@@ -191,10 +191,14 @@ class PlannerL1:
"""
Retrieve the com and feet positions from the problem and result
:param: pb dictionnary with the format required by SL1M
:param: result result of the optimisation
:param: coms CoM result of the optimisation
:param: moving_foot_pos Moving foot result of the optimisation
:param: all_feet_pos All feet result of the optimisation
:param: alphas alphas
:return: com positions, moving foot positions and all feet positions
"""
coms
=
[]
alphas
=
[]
moving_foot_pos
=
[]
all_feet_pos
=
[]
...
...
@@ -203,6 +207,7 @@ class PlannerL1:
all_feet_pos
.
append
([
self
.
feet
[
i
].
dot
(
result
[
j
:
j
+
self
.
default_n_variables
])
for
i
in
range
(
self
.
n_effectors
)])
moving_foot_pos
.
append
(
self
.
feet
[
phase
[
"Moving"
]].
dot
(
result
[
j
:
j
+
self
.
default_n_variables
]))
coms
.
append
(
self
.
com_2
.
dot
(
result
[
j
:
j
+
self
.
default_n_variables
]))
alphas
.
append
(
result
[
j
+
self
.
default_n_variables
:
j
+
self
.
__phase_n_variables
(
phase
)])
j
+=
self
.
__phase_n_variables
(
phase
)
return
coms
,
moving_foot_pos
,
all_feet_pos
return
coms
,
moving_foot_pos
,
all_feet_pos
,
alphas
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