We examine skyrmions under a dc drive interacting with a square array of obstacles for varied obstacle size and damping. When the drive is applied in a fixed direction, we find that the skyrmions are initially guided in the drive direction but also move transverse to the drive due to the Magnus force. The skyrmion Hall angle, which indicates the difference between the skyrmion direction of motion and the drive direction, increases with drive in a series of quantized steps as a result of the locking of the skyrmion motion to specific symmetry directions of the obstacle array. On these steps, the skyrmions collide with an integer number of obstacles to create a periodic motion. The transitions between the different locking steps are associated with jumps or dips in the velocity-force curves. In some regimes, the skyrmion Hall angle is actually higher than the intrinsic skyrmion Hall angle that would appear in the absence of obstacles. In the limit of zero damping, the skyrmion Hall angle is 90 • , and we find that it decreases as the damping increases. For multiple interacting skyrmion species in the collective regime, we find jammed behavior at low drives where the different skyrmion species are strongly coupled and move in the same direction. As the drive increases, the species decouple and each can lock to a different symmetry direction of the obstacle lattice, making it possible to perform topological sorting in analogy to the particle sorting methods used to fractionate different species of colloidal particles moving over two-dimensional obstacle arrays. © 2020 The Author(s). Published by IOP Publishing Ltd on behalf of the Institute of Physics and Deutsche Physikalische GesellschaftNew J. Phys. 22 (2020) 053025 N P Vizarim et alfrequency of the oscillations generated by the motion of the particle over the periodic substrate locks or comes into resonance with the ac drive frequency and its higher harmonics for a fixed range of drive intervals, producing steps in the velocity-force curves of the type found in Josephson junctions (which are known as Shapiro steps) [15,16], incommensurate sliding charge density waves [17], driven Frenkel-Kontorova systems [18], vortices in type-II superconductors moving over a periodic pinning substrate [19][20][21], and colloidal particles driven over periodic substrates [22,23]. In the case of the directional locking, there is no ac driving; however, two frequencies are still present, where one is associated with motion in the direction parallel to the drive and the other is associated with motion in the direction perpendicular to the drive. Directional locking can also arise in a system with a quasiperiodic substrate, where there are five or seven symmetry locking directions [24,25]. The locking can be harnessed for applications such as the sorting of different species of particles which have different sizes, charges, or damping, where a spatial separation of the species is achieved over time when one species locks to one angle while the other species locks to a different angl...