Skip to content

Commit

Permalink
Improve the data logging in the balancing-position-control
Browse files Browse the repository at this point in the history
  • Loading branch information
ergocub committed Aug 3, 2023
1 parent bb13cb1 commit 41cc906
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def main():
):
raise RuntimeError("Unable to set the references")


local_zmp_left, _ = evaluate_local_zmp(
wrench=left_wrench, contact_force_threshold=contact_force_threshold
)
Expand All @@ -383,20 +383,22 @@ def main():
com_from_desired = kindyn.getCenterOfMassPosition().toNumPy()
com_from_measured = kindyn_with_measured.getCenterOfMassPosition().toNumPy()



data = port.prepare()

data.vectors = {
"desired_zmp": desired_zmp,
"global_zmp": global_zmp,
"global_zmp_from_measured": global_zmp_from_measured,
"local_zmp_left": local_zmp_left,
"local_zmp_right": local_zmp_right,
"estimated_com_from_desired": com_from_desired,
"estimated_com_from_measured": com_from_measured,
"com_desired_position": com_spline_output.position,
"com_desired_velocity": com_spline_output.velocity,
"com_desired_acceleration": com_spline_output.acceleration,
"zmp::desired_planner": desired_zmp,
"zmp::measured::global::with_joint_desired": global_zmp,
"zmp::measured::global::with_joint_measured": global_zmp_from_measured,
"zmp::measured::local::left": local_zmp_left,
"zmp::measured::local::right": local_zmp_right,
"com::measured::with_joint_desired": com_from_desired,
"com::measured::with_joint_measured": com_from_measured,
"com::planned::position": com_spline_output.position,
"com::planned::velocity": com_spline_output.velocity,
"com::planned::acceleration": com_spline_output.acceleration,
"com::com_zmp::position": desired_com_position,
"com::com_zmp::velocity": desired_com_velocity,
"joints::desired::position": desired_joint_positions,
}
port.write()

Expand Down

0 comments on commit 41cc906

Please sign in to comment.