Dogs, especially Pet Dogs, have to be trained in all different environments and under all different distractions if we want to expcet them to be performing reliably.
Owners typically attend a dog training class that always happens in the same place (location/ environment). This is not a bad circumstance as far as actual learning/training is concerned.
1) All things happening should be exiting and feel great for your dog
The Dog training place should be a place of desire, happiness and comfort! NOT a place of forcefull demands!
I like to compare it with kids going to school. First task is to make everything in this environment comfortable and friendly!
and
2) AFTER behaviors function reliably in the controlled, comfortable environment, you will work with your dog in different places at different times to generalize the responses. This transition should be advanced in very small incrementsof degree of difficulty.
Think about school again. How did you learn how to write? It was one letter at the time- thousands of times. The paper had lines that helped to give reference for the shape/size of the letter. The pen you used was always the same. Fast forward- high school graduation 12 years later. you could write without lines, on any surface, with almost any instrument! With your finger in the sand, with a spray bottle on the wall, etc. BUT-a long time process to progress was granted! It has to be realized that a dog does not learn any different.