The paper attacks the problem of motion planning of a set of mobile robots. While artificial potential fields are the simplest methods of use, they are also locally optimal and can be easily stuck in scenarios. Probabilistic roadmap, elastic roadmaps, elastic strip and similar methods have a weak modelling of coordination between the robots. An inspiration is drawn from the artificial potential field method where the potential is computed in configuration space. In this paper the notion is extended to a ‘trajectory space’, where the complete trajectories of robots repel each other. With the added assumption of communication between the robots and higher computational costs, the resultant approach is near optimal and does not get the robot stuck or trapped. A variant of the algorithm with no direct communication is also presented. The method is experimented by using computer simulations and found to perform better over well-known approaches in the literature.