The last property is crucial, as modular robots can be reconfigured
to various structures and it is never possible to preprogram
their behaviors in advance. Moreover, all the possible
behaviors cannot be stored in a limited memory. Their motions
thus need to be achieved on demand using simple approaches like
CPGs. To obtain a desired locomotion, the parameters of the CPGs
have to be optimized. This can be solved using genetic algorithms
and other evolutionary methods [24,25,52]. However, optimization
of the gaits using these methods may require a considerable
amount of time. Utilizing motion primitives in the planning process
allows us to terminate the optimization early. Possible inefficiencies,
such as slow speed of the motions or unwanted rotation
during the motions, can be compensated by the planner.