This paper proposes a new methodology for coordinating multi-robot teams in the execution of cooperative tasks. It is based on a dynamic role assignment mechanism in which the robots assume and exchange roles during cooperation. We model the role assignment under a hybrid systems framework, using a hybrid automaton to represent roles, transitions and controllers. Using a multi-robot simulator, the methodology is demonstrated in a cooperative transportation task, in which a group of robots must find and cooperatively transport several objects scattered in the environment.