The answer is to follow some simple traffic stop etiquette.
#1 - Be Polite
But when an officer senses a confrontational attitude, they typically react by putting up their defenses. This can result in you seeing a "rude" officer. No doubt, this will cause you to be less than "warm and fuzzy". The situation can quickly escalate into a heated argument.... an argument that you can't possibly win.
If an officer has decided to give you a ticket, you can't talk yourself OUT of a ticket, but you can always talk yourself INTO one.
#2 - Don't Argue
Even if you are absolutely right and the officer is dead wrong, there is no point in arguing. You are not going to change the officer's mind. All you will do is create frustration for yourself. The time to argue the facts is in front of an impartial judge, not to the officer that just stopped you.
Remember, if an officer has decided to give you a ticket, you can't talk yourself OUT of a ticket, but you can always talk yourself INTO one.
#3 - Follow Directions
What will happen if you ignore their instructions? First of all, you will now be dealing with an agitated officer. Second, you may find yourself getting more than just a ticket, it could end up resulting in an arrest for obstructing the officer's job. Third, if you truly believe the officer was not behaving lawfully, failing to follow their instructions only makes you look bad. Now when you go to court to argue your case, you will be fighting an uphill battle, because you will appear to be the one that was causing the problem.
Either way, following the above traffic stop etiquette will greatly minimize the potential negative outcomes of such a situation.