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.
- 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
- Python 3.9 or higher
- pip (Python package manager)
-
Clone the repository:
git clone <repository-url> cd wall-finishing-robot
-
Create and activate a virtual environment:
# Windows python -m venv venv .\venv\Scripts\activate # Linux/Mac python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Start the server:
cd backend uvicorn main:app --reload -
Open your browser and navigate to:
http://localhost:8000
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 } ] }
-
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
Run the test suite:
pytest --maxfail=1 --disable-warnings -qThe test suite includes:
- Coverage planning algorithm tests
- API endpoint tests
- Database integration tests
- Performance tests (response time < 200ms)
/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
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
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.