  Mid-rapidity production of $\pi^{\pm}$, $\rm{K}^{\pm}$ and ($\bar{\rm{p}}$)p
measured by the ALICE experiment at the LHC, in Pb-Pb and inelastic pp
collisions at $\sqrt{s_{\rm{NN}}}$ = 5.02 TeV, is presented. The invariant
yields are measured over a wide transverse momentum ($p_{\rm{T}}$) range from
hundreds of MeV/$c$ up to 20 GeV/$c$. The results in Pb-Pb collisions are
presented as a function of the collision centrality, in the range 0$-$90%. The
comparison of the $p_{\rm{T}}$-integrated particle ratios, i.e. proton-to-pion
(p/$\pi$) and kaon-to-pion (K/$\pi$) ratios, with similar measurements in Pb-Pb
collisions at $\sqrt{s_{\rm{NN}}}$ = 2.76 TeV show no significant energy
dependence. Blast-wave fits of the $p_{\rm{T}}$ spectra indicate that in the
most central collisions radial flow is slightly larger at 5.02 TeV with respect
to 2.76 TeV. Particle ratios (p/$\pi$, K/$\pi$) as a function of $p_{\rm{T}}$
show pronounced maxima at $p_{\rm{T}}$ $\approx$ 3 GeV/$c$ in central Pb-Pb
collisions. At high $p_{\rm{T}}$, particle ratios at 5.02 TeV are similar to
those measured in pp collisions at the same energy and in Pb-Pb collisions at
$\sqrt{s_{\rm{NN}}}$ = 2.76 TeV. Using the pp reference spectra measured at the
same collision energy of 5.02 TeV, the nuclear modification factors for the
different particle species are derived. Within uncertainties, the nuclear
modification factor is particle species independent for high $p_{\rm{T}}$ and
compatible with measurements at $\sqrt{s_{\rm{NN}}}$ = 2.76 TeV. The results
are compared to state-of-the-art model calculations, which are found to
describe the observed trends satisfactorily.
