def makeStepMessages(self, stepFrames, leadingFoot, snapToTerrain=False):

        assert leadingFoot in ('left', 'right')
        isRightFootOffset = 0 if leadingFoot == 'left' else 1

        leftPoints, rightPoints = FootstepsDriver.getContactPts()

        # note, assumes symmetrical feet. the loop below should be
        # updated to alternate between left/right contact point sets
        footOriginToSole = -np.mean(leftPoints, axis=0)

        stepMessages = []
        for i, stepFrame in enumerate(stepFrames):

            t = transformUtils.copyFrame(stepFrame)
            t.PreMultiply()
            t.Translate(footOriginToSole)

            step = lcmdrc.footstep_t()
            step.pos = positionMessageFromFrame(t)
            step.is_right_foot = (i + isRightFootOffset) % 2
            step.params = self.footstepsDriver.getDefaultStepParams()

            step.fixed_x = True
            step.fixed_y = True
            step.fixed_z = True
            step.fixed_roll = True
            step.fixed_pitch = True
            step.fixed_yaw = True

            if snapToTerrain:
                step.fixed_z = False
                step.fixed_roll = False
                step.fixed_pitch = False

            stepMessages.append(step)

        return stepMessages
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/footstepsdriver.py/FootstepRequestGenerator.makeStepMessages/original