University of Glasgow - James Watt School of Engineering Robotics Team Design Project M (ENG5325)
- Python 3.8+
- Git
- Webots R2023b+ (download from cyberbotics.com)
git clone https://github.com/mushyalpha/robotics-tdp-team1.git
cd robotics-tdp-team1Windows:
pip install -r requirements.txtLinux/Mac:
pip3 install -r requirements.txt
# or use virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # Linux/Mac
pip install -r requirements.txtWindows:
- Download from: https://cyberbotics.com/
- Run installer and add to PATH
Linux (Ubuntu/Debian):
# Download .deb package from cyberbotics.com
sudo dpkg -i webots_2023b_amd64.deb
sudo apt-get install -f # Fix dependencies if neededMac:
# Download .dmg from cyberbotics.com and install
# Or use Homebrew:
brew install --cask webotsImportant: We use a shared simulation environment that gets updated collaboratively:
- Main simulation files are in
webots_simulation/worlds/ - Jie Shu (WP2) maintains the master simulation files
- Always pull latest changes before working on simulation
- Don't modify world files directly - create feature branches for simulation changes
- Coordinate with WP2 before making major simulation changes
# Open Webots
# File > Open World > webots_simulation/worlds/nao_soccer_field.wbt
# Run simulation- Install Git: Download from git-scm.com (Windows) or use package manager (Linux/Mac)
- Configure Git:
git config --global user.name "Your Name" git config --global user.email "firstname.lastname@glasgow.ac.uk"
- Clone repository:
git clone https://github.com/mushyalpha/robotics-tdp-team1.git cd robotics-tdp-team1
| Task | Command |
|---|---|
| Check status | git status |
| Stage changes | git add . |
| Commit | git commit -m "WP[X]: Brief description" |
| Push | git push origin branch-name |
| Pull latest | git pull origin develop |
| Create branch | git checkout -b feature/wp[X]-description |
| Switch branch | git checkout branch-name |
# 0. IMPORTANT: Save your work first!
# If you have uncommitted changes, either commit them or stash them:
git add .
git commit -m "WP[X]: Work in progress"
# OR: git stash (to temporarily save changes)
# 1. Start with latest changes
git checkout develop
git pull origin develop
# 2. Create your feature branch
git checkout -b feature/wp[X]-your-feature
# 3. Work on your code, then commit
git add .
git commit -m "WP[X]: What you implemented"
# 4. Push and create Pull Request on GitHub
git push origin feature/wp[X]-your-featuremain- Protected, stable releases onlydevelop- Integration branch, pull from here dailyfeature/wp[X]-description- Your work branches- Never commit directly to main/develop!
"I have uncommitted changes and need to switch branches":
# Option 1: Commit your work in progress
git add .
git commit -m "WP[X]: Work in progress - will continue later"
# Option 2: Stash changes temporarily
git stash
# ... do other work ...
git stash pop # Restore your changes later"Git won't let me switch branches":
# Check what's preventing the switch
git status
# Usually means you have uncommitted changes - see above solutions"I forgot to pull latest changes before starting work":
# If you haven't committed yet, stash and pull
git stash
git checkout develop
git pull origin develop
git checkout your-feature-branch
git stash pop
# If you have committed, merge develop into your branch
git checkout develop
git pull origin develop
git checkout your-feature-branch
git merge developWhat Happens as You Work: As you create more feature branches, your local Git will accumulate old branches:
git branch # Shows all your local branches
* develop
feature/wp3-balance-controller # Merged but still local
feature/wp3-kick-algorithm # Merged but still local
feature/wp3-walking-gait # Merged but still local
feature/wp3-vision-integration # Currently working onGitHub Auto-Delete vs Local Cleanup:
- GitHub automatically deletes remote branches after PR merge
- Local branches remain on your computer until you delete them
Weekly Cleanup Workflow:
# 1. Switch to develop and update
git checkout develop
git pull origin develop
# 2. See which branches are safe to delete (already merged)
git branch --merged develop
# 3. Delete merged local branches (excludes develop/main)
git branch --merged develop | grep -v develop | grep -v main | xargs git branch -d
# 4. Clean up remote tracking references
git remote prune origin
# 5. Check your clean branch list
git branch -vManual Cleanup (Alternative):
# Delete specific merged branch
git branch -d feature/wp3-balance-controller
# Force delete if Git complains (but you know it's merged)
git branch -D feature/wp3-old-experiment
# Check what's left
git branchKeep Your Workspace Clean:
- Delete branches immediately after PR merge
- Keep only active work - if it's merged, delete it
- Use descriptive names so you remember what branches were for
Essential for this project:
- Markdown All in One - Preview, table of contents, auto-formatting
- Markdown Preview Enhanced - Advanced preview with diagrams
- GitLens - Supercharged Git capabilities, blame annotations, history
- Python - Python language support, debugging, IntelliSense
- Pylance - Fast Python language server
- autoDocstring - Generates Python docstrings automatically
- Better Comments - Colour-coded comment highlighting
- Bracket Pair Colorizer 2 - Matching bracket colours
- indent-rainbow - Coloured indentation for better readability
Install via VS Code:
- Press
Ctrl+Shift+X(Extensions) - Search for extension name
- Click "Install"
Extension IDs for quick install:
yzhang.markdown-all-in-one
shd101wyy.markdown-preview-enhanced
eamodio.gitlens
ms-python.python
ms-python.vscode-pylance
njpwerner.autodocstring
aaron-bond.better-comments
coenraads.bracket-pair-colorizer-2
oderwat.indent-rainbow
Quick install: Ctrl+Shift+P → "Extensions: Install Extensions" → paste IDs above
- Comprehensive Guide: GitHub's Git Handbook
- Interactive Tutorial: Learn Git Branching
- Git Cheat Sheet: GitHub's Git Cheat Sheet
robotics-tdp-team1/
├── docs/ # Documentation
│ ├── meeting_notes/ # Weekly meeting records
│ ├── user_guides/ # Setup and usage guides
│ └── design_reviews/ # Design review documents
├── webots_simulation/ # Simulation environment
│ ├── worlds/ # Webots world files
│ ├── controllers/ # Robot controllers
│ └── plugins/ # Custom plugins
├── src/ # Source code
│ ├── wp3_guidance_control/# Low-level control algorithms
│ ├── wp4_behavioral/ # High-level behaviours
│ ├── vision/ # Computer vision modules
│ └── utils/ # Utility functions
├── tests/ # Test suite
├── naoqi_integration/ # NAOqi and Choreographe files
├── hardware_integration/ # Hardware testing
└── config/ # Configuration files
# Run all tests
pytest tests/
# Run specific test
pytest tests/test_motion_control.py
# With coverage
pytest --cov=src tests/- Team Coordination:
docs/team_coordination.md(workflow tracking & current tasks) - Requirements:
docs/requirements.md - Meeting Notes:
docs/meeting_notes/ - Work Package Logs:
docs/wp_logs/(detailed technical logs)
- Python: Follow PEP 8, max 100 chars/line, 4 spaces (no tabs)
- Naming:
PascalCasefor classes,snake_casefor functions,UPPER_SNAKE_CASEfor constants - Docstrings: Use Google style for all public functions/classes
- Comments: Explain why, not what
- Create feature branch:
feature/wp[X]-description - Update documentation if needed
- Get at least 1 review before merging
- No direct commits to main/develop
- Code follows style guide
- Tests pass and coverage adequate
- Documentation updated
- No obvious bugs or security issues
- Performance acceptable
- WP2 (Jie Shu): Simulation accuracy, world configs, performance
- WP3 (Bonolo): Control stability, clear APIs, safety
- WP4 (Zefu): Modular behaviours, state machines, decision logic
- WP5 (Chengjie): Hardware compatibility, deployment docs
- WP6 (Jinghao): Test coverage, procedures, metrics
Team members: Maintain your individual WP log weekly Technical Lead (Bonolo): Consolidates key progress into main development log
Each team member maintains: docs/wp_logs/wp[X]_[name]_log.md
Update weekly with:
- What you accomplished this week
- Technical decisions and why you made them
- Any issues
- Dependencies on other WPs
- Commits/PRs for traceability
Example WP Log Entry:
#### Week 2 (Oct 21-27, 2025)
- Implemented PID balance controller with Kp=1.2, Ki=0.1, Kd=0.05
- Fixed ankle joint oscillation by adjusting damping parameters
- Tested walking on flat surface - 90% success rate
- Blocker: Need IMU calibration data from hardware team
- Next: Test on slopes, integrate with motion controller
- Related: commit abc123f, PR #15