#!/usr/bin/zsh

#/* LICENSE:
#  =========================================================================
#    CMPack'04 Source Code Release for OPEN-R SDK 1.1.5-r2 for ERS7
#    Copyright (C) 2004 Multirobot Lab [Project Head: Manuela Veloso]
#    School of Computer Science, Carnegie Mellon University
#    All rights reserved.
#  ========================================================================= */


if [[ ! -f $1 ]] then
  echo "usage: dump_walk_param <walk.prm>";
  exit 1;
fi

fmt="\
leg 0: neutral  = %g %g %g@\
leg 0: lift_vel = %g %g %g@\
leg 0: down_vel = %g %g %g@\
leg 0: lift_time = %g@\
leg 0: down_time = %g@\
leg 1: neutral  = %g %g %g@\
leg 1: lift_vel = %g %g %g@\
leg 1: down_vel = %g %g %g@\
leg 1: lift_time = %g@\
leg 1: down_time = %g@\
leg 2: neutral  = %g %g %g@\
leg 2: lift_vel = %g %g %g@\
leg 2: down_vel = %g %g %g@\
leg 2: lift_time = %g@\
leg 2: down_time = %g@\
leg 3: neutral  = %g %g %g@\
leg 3: lift_vel = %g %g %g@\
leg 3: down_vel = %g %g %g@\
leg 3: lift_time = %g@\
leg 3: down_time = %g@\
max_vel: dx=%g dy=%g da=%g@\
body_height = %g@\
body_angle = %g@\
hop  = %g@\
sway = %g@\
period = %d@\
reserved = %d@\
front_height = %g@\
back_height = %g@\
"

hexdump -v -e \"$fmt\" $1 | sed -e 's/@/\n/g'
