{"id":28615778,"url":"https://github.com/pieter-rees/robot","last_synced_at":"2025-07-06T07:07:56.244Z","repository":{"id":286879702,"uuid":"962848612","full_name":"Pieter-Rees/robot","owner":"Pieter-Rees","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-26T21:26:43.000Z","size":4177,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T02:09:59.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pieter-Rees.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-08T19:07:04.000Z","updated_at":"2025-05-26T21:26:46.000Z","dependencies_parsed_at":"2025-05-26T22:23:02.315Z","dependency_job_id":"7d832f9f-a2ec-4a0a-b684-131477078c46","html_url":"https://github.com/Pieter-Rees/robot","commit_stats":null,"previous_names":["pieter-rees/robot"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Pieter-Rees/robot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pieter-Rees%2Frobot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pieter-Rees%2Frobot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pieter-Rees%2Frobot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pieter-Rees%2Frobot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pieter-Rees","download_url":"https://codeload.github.com/Pieter-Rees/robot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pieter-Rees%2Frobot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263861947,"owners_count":23521355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-12T02:09:51.132Z","updated_at":"2025-07-06T07:07:56.226Z","avatar_url":"https://github.com/Pieter-Rees.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Robot Controller\n\n[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n[![Documentation](https://img.shields.io/badge/docs-available-brightgreen.svg)](docs/)\n\nA comprehensive Python-based controller for a humanoid robot using the PCA9685 servo controller. This project provides both hardware control and a modern web interface for robot operation, making it perfect for robotics enthusiasts, educators, and developers.\n\n## ✨ Features\n\n- **Full Humanoid Control**\n\n  - 13 servo control with precise positioning\n  - Smooth movement sequences\n  - Pre-programmed movements and dances\n  - Safety features and servo limits\n\n- **Modern Web Interface**\n\n  - Real-time servo control with intuitive sliders\n  - Pre-programmed movement sequences\n  - Responsive design for all devices\n\n- **Development Tools**\n  - Mock controller for testing without hardware\n  - Comprehensive calibration tools\n  - Detailed logging and debugging\n  - Extensive test suite\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Python 3.8 or higher\n- Raspberry Pi (recommended) or compatible hardware\n- Adafruit PCA9685 board\n- Standard servos (compatible with 50Hz PWM)\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/yourusername/robot-controller.git\n   cd robot-controller\n   ```\n\n2. Run the installation script:\n\n   ```bash\n   ./install.sh\n   ```\n\n   This will:\n   - Create and activate a virtual environment\n   - Install all required dependencies\n   - Set up pre-commit hooks\n   - Create necessary configuration files\n\n   Alternatively, you can install manually:\n\n   ```bash\n   # Create and activate virtual environment\n   python -m venv venv\n   source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n   # Install the package with all dependencies\n   pip install -e \".[dev]\"\n\n   # Set up pre-commit hooks\n   pre-commit install\n   ```\n\n3. Configure your hardware:\n   - Follow the [hardware setup guide](#hardware-setup)\n   - Run the calibration tool: `python -m robot.calibration`\n   - The calibration settings will be saved in `servo_calibration.json`\n\n## 🏗️ Project Structure\n\n```\nrobot-controller/\n├── src/                    # Source code\n├── docs/                   # Documentation\n├── venv/                   # Virtual environment\n├── servo_calibration.json  # Servo calibration settings\n├── start.py               # Main entry point\n├── install.sh             # Installation script\n├── pyproject.toml         # Project configuration\n├── setup.py               # Package setup\n├── MANIFEST.in            # Package manifest\n└── .pre-commit-config.yaml # Pre-commit hooks\n```\n\n## 🛠️ Hardware Setup\n\n### Servo Connections\n\n| Channel | Component      | Description                   |\n| ------- | -------------- | ----------------------------- |\n| 0       | Head           | Controls head movement        |\n| 1       | Right Shoulder | Controls right arm movement   |\n| 2       | Left Shoulder  | Controls left arm movement    |\n| 3       | Right Elbow    | Controls right elbow movement |\n| 4       | Left Elbow     | Controls left elbow movement  |\n| 5       | Right Hip      | Controls right leg movement   |\n| 6       | Left Hip       | Controls left leg movement    |\n| 7       | Right Knee     | Controls right knee movement  |\n| 8       | Left Knee      | Controls left knee movement   |\n| 9       | Right Ankle    | Controls right foot movement  |\n| 10      | Left Ankle     | Controls left foot movement   |\n| 11      | Right Wrist    | Controls right hand movement  |\n| 12      | Left Wrist     | Controls left hand movement   |\n\n## 💻 Usage\n\n### Starting the System\n\n```bash\npython start.py\n```\n\nThis launches the main menu with options to:\n\n1. Start Web Interface\n2. Start Command Line Controller\n3. Run Calibration Tool\n4. Check and Install Dependencies\n5. Exit\n\n### Basic Robot Control\n\n```python\nfrom robot_controller import RobotController\n\n# Initialize the robot\nrobot = RobotController()\nrobot.initialize_robot()\n\n# Basic movements\nrobot.stand_up()\nrobot.step_forward()\nrobot.dance()\n\n# Advanced movements\nrobot.wave_hand(\"right\")\nrobot.look_around()\nrobot.perform_sequence(\"greeting\")\n\n# Shutdown\nrobot.shutdown()\n```\n\n### Web Interface\n\nAccess the web interface at `http://localhost:5000` after starting the web server.\n\n#### Features\n\n- Real-time servo control with sliders\n- Pre-programmed movements\n- Robot status display\n- Movement sequence programming\n\n#### API Endpoints\n\n| Endpoint             | Method | Description                 |\n| -------------------- | ------ | --------------------------- |\n| `/api/init`          | POST   | Initialize the robot        |\n| `/api/servo`         | POST   | Move a specific servo       |\n| `/api/servo/\u003cindex\u003e` | GET    | Get servo position          |\n| `/api/stand`         | POST   | Make robot stand up         |\n| `/api/walk`          | POST   | Make robot walk forward     |\n| `/api/shutdown`      | POST   | Shutdown the robot          |\n| `/api/robot_info`    | GET    | Get robot state information |\n| `/api/dance`         | POST   | Start dance routine         |\n\n## 🔧 Troubleshooting\n\n### Common Issues\n\n1. **Module Import Errors**\n\n   ```bash\n   # Set PYTHONPATH\n   export PYTHONPATH=$PYTHONPATH:$(pwd)/src\n   ```\n\n2. **Servo Jittering**\n\n   - Check power supply voltage\n   - Ensure proper grounding\n   - Verify servo connections\n\n### Debugging\n\nEnable debug logging:\n\n```python\nimport logging\nlogging.basicConfig(level=logging.DEBUG)\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Please follow these steps:\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a Pull Request\n\n### Development Setup\n\n1. Install development dependencies:\n\n   ```bash\n   pip install -e \".[dev]\"\n   ```\n\n2. Run tests:\n\n   ```bash\n   python -m pytest tests/\n   ```\n\n3. Check code style:\n   ```bash\n   pre-commit run --all-files\n   ```\n\n## 📚 Documentation\n\nFor detailed documentation, visit the [docs](docs/) directory in this repository.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Adafruit for the PCA9685 library\n- Open source robotics community\n- Contributors and maintainers\n\n---\n\nMade with ❤️ by the Robot Controller Team\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpieter-rees%2Frobot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpieter-rees%2Frobot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpieter-rees%2Frobot/lists"}