  When a superfluid flows past an obstacle, quantized vortices can be created
in the wake above a certain critical velocity. In the experiment by Kwon et al.
[Phys. Rev. A 91, 053615 (2015)], the critical velocity $v_c$ was measured for
atomic Bose-Einstein condensates (BECs) using a moving repulsive Gaussian
potential and $v_c$ was minimized when the potential height $V_0$ of the
obstacle was close to the condensate chemical potential $\mu$. Here we
numerically investigate the evolution of the critical vortex shedding in a
two-dimensional BEC with increasing $V_0$ and show that the minimum $v_c$ at
the critical strength $V_{0c}\approx \mu$ results from the local density
reduction and vortex pinning effect of the repulsive obstacle. The spatial
distribution of the superflow around the moving obstacle just below $v_c$ is
examined. The particle density at the tip of the obstacle decreases as $V_0$
increases to $V_{c0}$ and at the critical strength, a vortex dipole is suddenly
formed and dragged by the moving obstacle, indicating the onset of vortex
pinning. The minimum $v_c$ exhibits power-law scaling with the obstacle size
$\sigma$ as $v_c\sim \sigma^{-\gamma}$ with $\gamma\approx 1/2$.
