def get_heel_strike_events(state, side):
    """Get the time instances of heel strike."""
    assert(side in ['r', 'l'])
    if side == 'r':
        leg_name = 'leg1_r.state'
    else:
        leg_name = 'leg0_l.state'

    leg = state[leg_name].round()
    heel_strik = leg.diff() < 0
    return leg[heel_strik].index.tolist()