def footOnFloorFrames( model , heel_joint ,  toeBase_joint , end_joint ):
    """ This function returns a list of the frames where the foot is on the ground."""
    """ Parameters : 
            model : An instance of the class model.Model .
            heel_joint : A string with the name of the joint that resembles the 'Heel' of a chosen foot .
            oeBase_joint : A string with the name of the joint that resembles the 'Toe Base' of a chosen foot .
            end_joint : A string with the name of the joint that resembles the 'End' of a chosen foot .
    """


    frames = movement.jointLowestFrames( model , heel_joint , 1.1 )

    return frames
plt.plot( axSpeed , speed , 'g-')
plt.show()
plt.plot( axAcceleration, acceleration , "r-" )
plt.show()

########### Get stride length 

import model as m
modelo =  m.Model( "sample-mocap-data//05//05_01_ignoreFirstFrame.bvh" )
modelo.read()

import bipedal as bip
bip.strideLength( modelo , "LeftFoot" ,  "LeftToeBase" , "LeftToeBase_EndSite" )

import movement as mov
mov.jointLowestFrames( modelo , "LeftFoot" , 1.1 )

mov.plotJointPositionCoordinate( modelo , [ "LeftFoot" , "LeftToeBase" , "LeftToeBase_EndSite" ] , 1 ) 


########### Get period of discrete data

import model as m
modelo =  m.Model( "sample-mocap-data//05//05_01_ignoreFirstFrame.bvh" )
modelo.read()

import movement as mov
data = mov.getJointPosition( modelo , "LeftFoot" ) 
signal = [ position[ 1 , 0 ] for position in data ]