Skip to content

Commit

Permalink
Added saving to file of walking on stairs output
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Dafarra committed Jul 29, 2024
1 parent 9f9b74c commit d6a40bf
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging

import casadi as cs
import hdf5storage
import idyntree.bindings as idyntree
import liecasadi
import numpy as np
Expand Down Expand Up @@ -584,6 +585,21 @@ def get_references(
file_name_stem="humanoid_walking_step",
)

print("Saving data to humanoid_walking_step.mat")

humanoid_walking_step = {
"output": output.to_dict(),
"guess": planner_guess.to_dict(
flatten=False,
output_conversion=hippopt.OptimizationObject.DMConversion,
),
}
hdf5storage.savemat(
file_name="humanoid_walking_step.mat",
mdict=humanoid_walking_step,
truncate_existing=True,
)

plotter_settings = hp_rp.FootContactStatePlotterSettings()
plotter_settings.terrain = planner_settings.terrain
left_foot_plotter = hp_rp.FootContactStatePlotter(plotter_settings)
Expand Down

0 comments on commit d6a40bf

Please sign in to comment.