As in the kinematic_model.py you can change the foot position, you can make a time varying system by changing the feet position describing a bezier curve.
So building a parametric bezier curve (11 points for now) you can follow a closed step loop, i drew this curve on this bezier curve generator: https://www.desmos.com/calculator/xlpbe9bgll
This can by written by an equation dependant of the N point and a parameter going from 0 to 1 in order to describe the trajectory. In the the gaitPlanner.py file is known as phi and the start-end point is [0,1). This parameter is important, because it tells you where the foot is located, these coordinates are defined in the foot frame.
The equations are based on the paper Leg Trajectory Planning for Quadruped Robots with High-Speed Trot Gait from the MIT cheetah robot (equations 11-23-24-TABLE II).
But in my case, i chose similar points but with 10 points (removing P6 and P4) and i'm just multiplying all points by a velocity command in order to make the trajectory wider.
Also for every loop, the swing and stance loops are running, each from 0 to 1, first stance phase then swing, with an offset between them which, if it is set at 0.5, both phases last the same. I another case, for creep gait, this offset must be set at 0.75, meaning that stance phase will last 3/4 of the step.
Then making 4 loops going from 0 to 1, for every leg and define an offset for every foot you can do different gaits as shown in the video.
In the video i explain how you can generate different gaits just by changing the offset between the feet loop:
You can play with the simulation at the walking_simulation_example.py file just python3 with pybullet and numpy needed to run the simulation.