Sim-to-Real Transfer for Quadrupedal Locomotion via Terrain Transformer