This study aims at providing a control-learning framework capable of generating optimal locomotion patterns for the modular robots. The key ideas are firstly to provide a generic control structure that can be well-adapted for the different morphologies and secondly to exploit and coevolve both morphology and control aspects. A generic framework combining robot morphology, control and environment and on the top of them optimization and evolutionary algorithms are presented. The details of the components and some of the preliminary results are discussed. (C) Selection and peer-review under responsibility of FET11 conference organizers and published by Elsevier B.V.