This repository contains the implementation of a Central Pattern Generator (CPG) model optimized using a Genetic Algorithm (GA) for controlling a Mantis robot.
The project demonstrates the integration of a CPG model with GA optimization to enhance the locomotion capabilities of a Mantis robot in a Webots simulation environment. The CPG controller is based on the principles discussed in the following paper: Learning to Move in Modular Robots using Central Pattern Generators and Online Optimization.
To run the code, follow these steps:
-
Add the world to Webots:
- Open the Webots simulation environment.
- Add the provided world file to the Webots environment.
-
Choose the controller:
- Select the appropriate controller for the robot in Webots.
The CPG controller implements a central pattern generator based on the mentioned paper. The hyperparameters for this controller are selected experimentally and are not optimized.
The GA controller uses optimized hyperparameters of the CPG controller obtained via a genetic algorithm. The optimization process is run for 10 generations with an initial population of 30.
To use the controllers, follow these steps:
- Clone the repository:
git clone https://github.com/yourusername/CPG-controller-with-GA-optimization.git cd CPG-controller-with-GA-optimization