I agree with practicing over obstacles, but only after the horse has mastered things like the side pass, turn on haunches, turn on forehand, without any obstacle.
Do you know how to apply leg cues?
Turn on the forehand can first be taught from the ground , if you wish, using your hand where your leg would be, to ask those hips to yield
I also like to teach the half pass, before the complete and correct sidepass
Not going into all the details her, but I would teach your horse the half pass, the turn on the haunches and the turn on the forehand
You can then put those things together, and teach the sidepass. Using some barrier at first is helpful in preventing the horse from moving foreward
A correct sidepass has the horse crossing over front and back, with neither the front end or the rear leading
Next, you can ask for the sidepass in the open. Once that is good, that is the time to start sidepassing over logs , etc
A gate, etc is only a combination of those skills , while working that gate
Never get after a horse at an obstacle, but instead break down what the real problem is, fix it, and then go back to that obstacle
For instance, here is a mistake I often see some people make. Their horse does not want to sidepass back up tot he gate, after going through it, and instead will sidepass into the rider’s leg,a way from the gate
Getting after the horse at the gate, only gets him to associate that gate with negative things
Instead, take that horse away from the gate, and get after the real problem, making him move off of that leg, hsrd, that he sidepassed into.
You then give the horse a chance to do the right thing, taking him back to the gate and asking him with light cues