A numerical method for the evaluation of compact travelling waves (CTWs) of nonlinear evolution equations when the analytical solution is not available is proposed. The algorithm is based on a quadrature formula for a singular integral and has been validated by comparison with the exact expressions for the compactons of the Rosenau–Hyman equation. Compactons and kovatons, the CTWs of the Rosenau–Pikovsky equation, are numerically determined and their main features are discussed. The normalization of the shape of these solutions show that there is no scaling symmetry among them, as it does for the equation.