Skip to content

forrealdeveloper/Wall-Finishing-Robot-Control-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wall Finishing Robot Control System

A complete backend-driven control system for an autonomous wall-finishing robot. This system provides intelligent path planning, trajectory management, and a web-based visualization interface.

Features

  • Grid-based coverage path planning with obstacle avoidance
  • Real-time trajectory visualization with playback controls
  • Trajectory storage and management
  • RESTful API for integration with robot control systems
  • Comprehensive logging and monitoring
  • Automated test suite

Prerequisites

  • Python 3.9 or higher
  • pip (Python package manager)

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd wall-finishing-robot
  2. Create and activate a virtual environment:

    # Windows
    python -m venv venv
    .\venv\Scripts\activate
    
    # Linux/Mac
    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Start the server:

    cd backend
    uvicorn main:app --reload
  5. Open your browser and navigate to:

    http://localhost:8000
    

API Endpoints

Coverage Planning

  • POST /api/coverage-plan
    • Generates a coverage trajectory for a wall with optional obstacles
    • Request body:
      {
        "wall_width": 5.0,
        "wall_height": 5.0,
        "obstacles": [
          {
            "x": 1.0,
            "y": 2.0,
            "width": 0.25,
            "height": 0.25
          }
        ]
      }

Trajectory Management

  • GET /api/trajectories

    • Lists stored trajectories with pagination
    • Query parameters:
      • limit (default: 10)
      • offset (default: 0)
  • GET /api/trajectory/{trajectory_id}

    • Retrieves a specific trajectory with its waypoints
  • DELETE /api/trajectory/{trajectory_id}

    • Deletes a stored trajectory

Testing

Run the test suite:

pytest --maxfail=1 --disable-warnings -q

The test suite includes:

  • Coverage planning algorithm tests
  • API endpoint tests
  • Database integration tests
  • Performance tests (response time < 200ms)

Project Structure

/project_root
  /backend
    main.py              # FastAPI application
    coverage_planner.py  # Path planning algorithm
    models.py           # SQLAlchemy models
    database.py         # Database connection
    schemas.py          # Pydantic models
    /routers
      coverage.py       # Coverage planning routes
      trajectories.py   # Trajectory management routes
    /logs
      server.log       # Application logs
  /frontend
    index.html         # Main UI
    styles.css         # Styling
    app.js            # Frontend logic
  /tests
    test_coverage_plan.py
    test_trajectories.py
  requirements.txt
  README.md

Logging

The system logs all API requests and responses to backend/logs/server.log with the following format:

[2025-06-04 10:15:30] [INFO] Request: POST /api/coverage-plan body={...}
[2025-06-04 10:15:30] [INFO] Response time: 15 ms

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published