  In this paper, we propose a scheme for implementing the nonadiabatic
holonomic quantum computation (NHQC+) of two Rydberg atoms by using
invariant-based reverse engineering (IBRE). The scheme is based on F\"orster
resonance induced by strong dipole-dipole interaction between two Rydberg
atoms, which provides a selective coupling mechanism to simply the dynamics of
system. Moreover, for improving the fidelity of the scheme, the optimal control
method is introduced to enhance the gate robustness against systematic errors.
Numerical simulations show the scheme is robust against the random noise in
control fields, the deviation of dipole-dipole interaction, the F\"orster
defect, and the spontaneous emission of atoms. Therefore, the scheme may
provide some useful perspectives for the realization of quantum computation
with Rydberg atoms.
