Cooperative robotics has considered tasks that are executed frequently, maintaining the shape and orientation of robotic systems when they fulfill a common objective, without taking advantage of the redundancy that the robotic group could present. This paper presents a proposal for controlling a group of terrestrial robots with heterogeneous characteristics, considering primary and secondary tasks thus that the group complies with the following of a path while modifying its shape and orientation at any time. The development of the proposal is achieved through the use of controllers based on linear algebra, propounding a low computational cost and high scalability algorithm. Likewise, the stability of the controller is analyzed to know the required features that have to be met by the control constants, that is, the correct values. Finally, experimental results are shown with different configurations and heterogeneous robots, where the graphics corroborate the expected operation of the proposal.