Welcome to the Webots Robot Control Tutorial repository! This project is a curated collection of robot control examples and sensor interfacing using the Webots simulator. It covers fundamental techniques such as Bang-Bang, PID, Fuzzy Logic controllers, as well as sensor-based feedback systems. Designed for students, educators, and robotics enthusiasts.
.
βββ LICENSE
βββ README.md
βββ Tutorial
βββ controllers/ # Python-based Webots controllers
β βββ bangbang_controller_wall_following/ # Bang-bang control example
β βββ fuzzy_logic_controller_wall_following/ # Fuzzy logic wall following
β βββ pid_controller_wall_following/ # PID-based wall following
β βββ motor_teleoperation/ # Manual motor control
β βββ sensor_accelerometer_gyroscope/ # IMU sensor reading
β βββ sensor_odometer_calculation/ # Odometer calculation example
β βββ sensor_proximity/ # Single proximity sensor
β βββ sensor_ultrasonic/ # Multiple ultrasonic (proximity) sensors
βββ requirements.txt # Python dependencies (if any)
βββ worlds/
βββ arena.wbt # Simulation world for all tutorials
- Webots Simulator (version 2023+ recommended)
- Python 3.x (with Webots Python controller bindings)
- [Optional]
pip install numpy scikit-fuzzy(for fuzzy logic controller)
-
Open Webots and load the
arena.wbtworld from theTutorial/worlds/directory. -
Choose the desired controller from
Tutorial/controllers/by:- Right-clicking on the robot
- Selecting "Controller"
- Choosing the appropriate controller script
-
Run the simulation and observe the behavior.
| Controller Directory | Description |
|---|---|
bangbang_controller_wall_following/ |
Implements simple bang-bang wall-following based on threshold distance. |
pid_controller_wall_following/ |
PID control for smoother wall-following with continuous feedback. |
fuzzy_logic_controller_wall_following/ |
Uses fuzzy logic rules to navigate by maintaining distance from the wall. |
motor_teleoperation/ |
Enables manual control of robot motors using predefined commands. |
sensor_accelerometer_gyroscope/ |
Reads IMU values (acceleration and rotation) from the e-puck robot. |
sensor_odometer_calculation/ |
Demonstrates basic odometry calculation using wheel encoders. |
sensor_proximity/ |
Prints readings from a single proximity sensor (ps0). |
sensor_ultrasonic/ |
Reads and displays values from all 8 e-puck proximity sensors. |
By exploring this repository, learners will be able to:
- Understand and compare different robot control techniques.
- Interface various onboard sensors in Webots.
- Implement reactive and feedback-based control.
- Simulate realistic robotics scenarios and evaluate algorithms.
Install Python libraries only if you're running advanced control logic (e.g. fuzzy):
pip install numpy scikit-fuzzyFor default use, Webots comes with all necessary Python controller bindings.
Developed by 2black0
This project is licensed under the MIT License
β¨ Contributions and feedback are welcome! Feel free to open issues or submit pull requests.