A comprehensive robot navigation simulation project built with Webots, featuring multiple navigation algorithms, sensor integration, and advanced robotics capabilities.
This project implements a simulated robot navigation system with various controllers for autonomous navigation, obstacle avoidance, and environmental perception. The simulation uses Webots as the robotics simulator and includes implementations of pathfinding algorithms, collision avoidance, SLAM, and multi-modal input processing.
SimulatedRobotNavigation/
โ
โโโ requirements.txt # Python dependencies
โ
โโโ controllers/ # Robot controllers
โ โโโ CollisionAvoidance/ # Obstacle avoidance controller
โ โโโ OCR/ # Optical Character Recognition
โ โโโ SLAM/ # Simultaneous Localization and Mapping
โ โโโ SpeechRecognition/ # Voice command processing
โ
โโโ Navigation/ # Navigation implementations
โ โโโ controllers/
โ โ โโโ Navigation_AStar/ # A* pathfinding algorithm
โ โ โโโ NavV2/ # Navigation version 2
โ โ โโโ NavV3/ # Navigation version 3 (most advanced)
โ โโโ textures/ # Visual assets
โ โโโ worlds/
โ โโโ Indoors.wbt # Indoor simulation world
โ
โโโ libraries/ # Shared libraries
โ
โโโ plugins/ # Webots plugins
โ โโโ physics/
โ โโโ remote_controls/
โ โโโ robot_windows/
โ
โโโ protos/ # Custom Webots prototypes
โ
โโโ worlds/
โโโ Indoors.wbt # Main simulation world
- A Pathfinding (NavV1)*: Basic graph-based navigation using A* algorithm with corner nodes
- NavV2: Enhanced navigation with configurable map parameters
- NavV3: Advanced navigation system with:
- Support for corner nodes and door nodes
- Hallway-based navigation
- JSON configuration files for flexible map definitions
- Room number identification
-
Collision Avoidance: Reactive obstacle avoidance using distance sensors
- 16 distance sensors for 360ยฐ coverage
- Configurable sensor weights
- LED indicators for collision states
- Dynamic speed adjustment
-
SLAM (Simultaneous Localization and Mapping):
- ROS2 integration for mapping and localization
- Lidar sensor integration (Sick LMS 291)
- Odometry tracking
- Real-time position and orientation updates
-
OCR (Optical Character Recognition):
- Text recognition from robot camera
- Pytesseract integration
-
Speech Recognition:
- Voice command processing
- PyAudio integration for audio input
- Webots R2025a or later
- Python 3.7+
- (Optional) ROS2 for SLAM features
-
Clone the repository:
git clone <repository-url> cd SimulatedRobotNavigation
-
Install Python dependencies:
pip install -r requirements.txt
Dependencies include:
SpeechRecognition==3.14.4- Voice command processingPyAudio==0.2.14- Audio input handlingpytesseract==0.3.13- OCR capabilitiesnumpy==2.3.4- Numerical computationspipwin==0.5.2- Windows package manager
-
Additional Setup for OCR:
- Install Tesseract OCR
- Add Tesseract to your system PATH
-
For SLAM (optional):
- Install ROS2
- Source your ROS2 installation
-
Open Webots:
- Launch Webots
- Open the world file:
worlds/Indoors.wbt
-
Select a Controller:
- In the Scene Tree, select your robot
- In the Controller field, choose one of:
Navigation_AStar- Basic A* navigationNavV2- Enhanced navigationNavV3- Advanced navigation with room supportCollisionAvoidance- Reactive obstacle avoidanceSLAM- Mapping and localization
-
Run the Simulation:
- Click the play button in Webots
- The robot will execute the selected controller
Edit Navigation/controllers/NavV3/hallways_config.json to customize the navigation graph:
{
"corners": [
{"name": "corner_se", "position": [1.0, -3.0]},
{"name": "corner_ne", "position": [1.0, 6.0]}
],
"doors": [
{"name": "room_101", "position": [0.5, 2.0], "room_number": "101"}
],
"hallways": [
{"from": "corner_se", "to": "corner_ne"}
]
}The A* algorithm implementation uses:
- Heuristic: Euclidean distance
- Node Types: Corner nodes (hallway intersections)
- Path Planning: Shortest path between waypoints
The collision avoidance system:
- Uses 16 distance sensors arranged around the robot
- Implements weighted steering based on obstacle proximity
- Maintains a minimum distance of 1.0 meter from obstacles
- Provides visual feedback through LED indicators
The simulated robot (Pioneer 3-DX compatible) includes:
- Sensors:
- 16 distance sensors (ultrasonic/IR)
- Lidar (Sick LMS 291) for SLAM
- Camera for OCR
- Microphone for speech recognition
- Actuators:
- Differential drive wheels
- LED indicators
- Parameters:
- Max speed: 5.24 rad/s
- Wheel radius: 0.0975 m
- Wheel distance: 0.33 m
The Indoors.wbt world includes:
- 24m ร 24m floor space
- Multiple rooms and hallways
- Walls and obstacles
- Textured backgrounds
- Appropriate lighting for camera operations
- Edit the configuration JSON file (e.g.,
hallways_config.json) - Add node definitions with positions
- Define connections between nodes
- Restart the simulation
- Create a new folder in
controllers/ - Implement the controller class inheriting from
Robot - Define the control logic in the main loop
- Register the controller in Webots
Navigation/controllers/NavV2/map_config.json- NavV2 map configurationNavigation/controllers/NavV3/hallways_config.json- NavV3 graph definitionNavigation/controllers/NavV3/H_Hallway.json- H-shaped hallway layout
-
Import Error for Webots Controller:
- Ensure Webots is properly installed
- Check that the controller is run from within Webots
-
Speech Recognition Not Working:
- Verify PyAudio installation
- Check microphone permissions
- On Windows, you may need to use
pipwin install pyaudio
-
OCR Not Detecting Text:
- Ensure Tesseract is installed and in PATH
- Check camera positioning and lighting in simulation
-
SLAM/ROS2 Issues:
- Verify ROS2 installation and sourcing
- Check that the lidar device name matches your world configuration
Contributions are welcome! Areas for improvement:
- Additional pathfinding algorithms (D*, RRT)
- Enhanced sensor fusion
- Machine learning-based navigation
- Multi-robot coordination
- Real-world robot deployment
[Specify your license here]
[Specify authors/contributors here]
- v3.0 - Advanced navigation with room support and JSON configuration
- v2.0 - Enhanced navigation system
- v1.0 - Basic A* pathfinding implementation
Last Updated: February 2026