© 2021, Springer Nature Switzerland AG.Self-organised flocking behaviour, an emergent collective motion, appears in various physical and biological systems. It has been widely utilised to guide the swarm robotic system in different applications. In this paper, we developed a self-organised flocking mechanism for the homogeneous robotic swarm, which can achieve the collective motion with obstacle avoidance in a cluttered environment. The proposed mechanism introduces an obstacle avoidance approach to the Active Elastic Sheet model that was previously proposed for self-propelled particles. The proposed mechanism is represented by a nonlinear repulsive force inspired by Lennard-Jones potential function in molecular dynamics. In order to evaluate the flocking performance, three different environmental settings were implemented. Results revealed that the interaction mechanism significantly determines the robustness and stability of the swarm in flocking.