  We employ a variational basis with a number of $\bar{q}q$ and $\pi\pi$
lattice interpolating fields with quantum numbers of the $\rho$ resonance to
extract the discrete energy spectrum in a finite volume. In the elastic region,
this spectrum is related to the phase shift of the continuum scattering
amplitude by L\"uscher's formula and the relation allows the extraction of
resonance parameters from the spectrum calculation. The simulations are
performed at three different total momenta of the coupled $\bar q q-\pi\pi$
system, which allows us to extract the p-wave scattering phase at five values
of pion relative momenta near the resonance region. The effective range formula
describes the phase-shift dependence nicely and we extract the resonance mass
$m_\rho=792(7)(8)$ MeV and the coupling $g_{\rho\pi\pi}=5.13(20)$ at our
$m_\pi\simeq 266 $MeV. The coupling $g_{\rho\pi\pi}$ is directly related to the
width of the $\rho$ meson and our value is close to the value derived from the
experimental width. The simulations are performed using dynamical gauge
configurations with two mass-degenerate flavors of tree-level improved
clover-Wilson fermions. Correlation functions are calculated using the recently
proposed distillation method with Laplacian Heaviside (LapH) smearing of
quarks, which enables flexible calculations, in many cases with unprecedented
accuracy.
