8000 GitHub - bazayd/SimulatedRobotNavigation
[go: up one dir, main page]

Skip to content

bazayd/SimulatedRobotNavigation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

23 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Simulated Robot Navigation

A comprehensive robot navigation simulation project built with Webots, featuring multiple navigation algorithms, sensor integration, and advanced robotics capabilities.

๐Ÿ“‹ Overview

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.

๐Ÿ—๏ธ Project Structure

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

๐Ÿš€ Features

Navigation Systems

  • 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

Controller Modules

  • 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

๐Ÿ› ๏ธ Installation

Prerequisites

  • Webots R2025a or later
  • Python 3.7+
  • (Optional) ROS2 for SLAM features

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd SimulatedRobotNavigation
  2. Install Python dependencies:

    pip install -r requirements.txt

    Dependencies include:

    • SpeechRecognition==3.14.4 - Voice command processing
    • PyAudio==0.2.14 - Audio input handling
    • pytesseract==0.3.13 - OCR capabilities
    • numpy==2.3.4 - Numerical computations
    • pipwin==0.5.2 - Windows package manager
  3. Additional Setup for OCR:

  4. For SLAM (optional):

    • Install ROS2
    • Source your ROS2 installation

๐ŸŽฎ Usage

Running Simulations

  1. Open Webots:

    • Launch Webots
    • Open the world file: worlds/Indoors.wbt
  2. Select a Controller:

    • In the Scene Tree, select your robot
    • In the Controller field, choose one of:
      • Navigation_AStar - Basic A* navigation
      • NavV2 - Enhanced navigation
      • NavV3 - Advanced navigation with room support
      • CollisionAvoidance - Reactive obstacle avoidance
      • SLAM - Mapping and localization
  3. Run the Simulation:

    • Click the play button in Webots
    • The robot will execute the selected controller

Navigation Configuration

NavV3 Configuration

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"}
  ]
}

๐Ÿ“Š Navigation Algorithms

A* Pathfinding

The A* algorithm implementation uses:

  • Heuristic: Euclidean distance
  • Node Types: Corner nodes (hallway intersections)
  • Path Planning: Shortest path between waypoints

Collision Avoidance

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

๐Ÿค– Robot Configuration

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

๐Ÿ—บ๏ธ World Environment

The Indoors.wbt world includes:

  • 24m ร— 24m floor space
  • Multiple rooms and hallways
  • Walls and obstacles
  • Textured backgrounds
  • Appropriate lighting for camera operations

๐Ÿ”ง Development

Adding New Navigation Nodes

  1. Edit the configuration JSON file (e.g., hallways_config.json)
  2. Add node definitions with positions
  3. Define connections between nodes
  4. Restart the simulation

Creating Custom Controllers

  1. Create a new folder in controllers/
  2. Implement the controller class inheriting from Robot
  3. Define the control logic in the main loop
  4. Register the controller in Webots

๐Ÿ“ Configuration Files

  • Navigation/controllers/NavV2/map_config.json - NavV2 map configuration
  • Navigation/controllers/NavV3/hallways_config.json - NavV3 graph definition
  • Navigation/controllers/NavV3/H_Hallway.json - H-shaped hallway layout

๐Ÿ› Troubleshooting

Common Issues

  1. Import Error for Webots Controller:

    • Ensure Webots is properly installed
    • Check that the controller is run from within Webots
  2. Speech Recognition Not Working:

    • Verify PyAudio installation
    • Check microphone permissions
    • On Windows, you may need to use pipwin install pyaudio
  3. OCR Not Detecting Text:

    • Ensure Tesseract is installed and in PATH
    • Check camera positioning and lighting in simulation
  4. SLAM/ROS2 Issues:

    • Verify ROS2 installation and sourcing
    • Check that the lidar device name matches your world configuration

๐Ÿค Contributing

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

๐Ÿ“„ License

[Specify your license here]

๐Ÿ‘ฅ Authors

[Specify authors/contributors here]

๐Ÿ”— Resources

๐Ÿ“… Version History

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

0