Characteristics of the radiation emitted by protons and antiprotons in an undulator