Skip to content

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.

License

Notifications You must be signed in to change notification settings

2black0/Webots-Robot-Control-Tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Webots Robot Control Tutorial

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.


πŸ“‚ Project Structure

.
β”œβ”€β”€ 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

πŸš€ Getting Started

πŸ› οΈ Requirements

  • Webots Simulator (version 2023+ recommended)
  • Python 3.x (with Webots Python controller bindings)
  • [Optional] pip install numpy scikit-fuzzy (for fuzzy logic controller)

▢️ Running a Simulation

  1. Open Webots and load the arena.wbt world from the Tutorial/worlds/ directory.

  2. Choose the desired controller from Tutorial/controllers/ by:

    • Right-clicking on the robot
    • Selecting "Controller"
    • Choosing the appropriate controller script
  3. Run the simulation and observe the behavior.


πŸ“˜ Controllers Description

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.

🎯 Learning Goals

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.

πŸ“¦ Requirements

Install Python libraries only if you're running advanced control logic (e.g. fuzzy):

pip install numpy scikit-fuzzy

For default use, Webots comes with all necessary Python controller bindings.


πŸ§‘β€πŸ’» Author

Developed by 2black0


πŸ“„ License

This project is licensed under the MIT License


✨ Contributions and feedback are welcome! Feel free to open issues or submit pull requests.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages