Place decoupling capacitor before or after the reverse voltage protection diode?
Use B. You want the robot circuit supply to have lowest impedance. The cap's are across the circuit on B. On A, there is series impedance by the diode.