We study the topological invariant TC(X) reflecting the complexity of algorithms for autonomous robot motion. Here, X stands for the configuration space of a system and TC(X) is, roughly, the minimal number of continuous rules which are needed to construct a motion planning algorithm in X. We focus on the case when the space X is aspherical; then the number TC(X) depends only on the fundamental group pi = pi(1)(X) and we denote it by TC(pi). We prove that TC(pi) can be characterised as the smallest integer k such that the canonical pi x pi-equivariant map of classifying spaces E(pi x pi) -> E-p(pi x pi) can be equivariantly deformed into the k-dimensional skeleton of E-D(pi x pi). The symbol E(pi x pi) denotes the classifying space for free actions and E-D(pi x pi) denotes the classifying space for actions with isotropy in the family D of subgroups of pi x pi which are conjugate to the diagonal subgroup. Using this result we show how one can estimate TC(pi) in terms of the equivariant Bredon cohomology theory. We prove that TC(pi) <= max{3,cd(D)(pi x pi)}, where cd(D)(pi x pi) denotes the cohomological dimension of pi x pi with respect to the family of subgroups D. We also introduce a Bredon cohomology refinement of the canonical class and prove its universality. Finally we show that for a large class of principal groups (which includes all torsion-free hyperbolic groups as well as all torsion-free nilpotent groups) the essential cohomology classes in the sense of Farber and Mescher (2017) are exactly the classes having Bredon cohomology extensions with respect to the family D.