This project, serves as our Robotics semester project for the 5th semester of BS Artificial Intelligence at Bahria University. The project focuses on creating a wall-following robot controller using the Webots simulation environment. The robot will navigate along a wall while avoiding obstacles.
- Introduction
- Program
- University
- Instructor
- Implementation Details
- Getting Started
- Contributing
- Group Members
๐ This project is part of the BS Artificial Intelligence program at Bahria University.
๐ซ Bahria University
๐ Professor Adil Khan
๐ค - The robot consists of two wheels: a left wheel and a right wheel.
- Eight proximity sensors (ps0 to ps7) detect obstacles around the robot.
-
Initialization:
- Set the time step for simulation.
- Define the maximum speed for the robot.
-
Motor Configuration:
- Enable the left and right motors.
- Set the initial motor positions and velocities.
-
Sensor Setup:
- Enable the proximity sensors.
- Read sensor values during each simulation step.
-
Main Loop:
- While the simulation is running:
- Read sensor data from all eight proximity sensors.
- Determine if there's a wall on the left, a corner on the left, or an obstacle in front.
- Adjust the left and right motor speeds accordingly:
- If there's a front wall, turn right in place.
- If there's a left wall, drive forward.
- If there's a left corner, steer right to avoid collision.
- While the simulation is running:
-
Actuator Commands:
- Set the left and right motor velocities based on the calculated speeds.
-
Exit Cleanup:
- Perform any necessary cleanup before exiting the simulation.
๐ To get started with this project, follow these steps:
- Clone this repository to your local machine.
- Open the Webots environment.
- Load the robot model and the corresponding file.
- Run the simulation and observe the robot's behavior.
๐ Contributions are welcome! If you'd like to improve this project, please:
- Fork the repository.
- Create a new branch (
git checkout -b feature/improvement
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/improvement
). - Create a new Pull Request.
๐ฅ
- Babar Ali
- Zain ul Abadeen