Skip to content

Python simulations and notes for mobile robot control, focusing on kinematics, dynamics, and feedback control.

License

Notifications You must be signed in to change notification settings

Maurilio97-P/mobile-robot-control-python-sim

Repository files navigation

Control of Mobile Robots - Python Educational Repository

Open-source Python implementation of GeorgiaTech's "Control of Mobile Robots" course

A free, educational alternative to MATLAB for learning mobile robot control theory and implementation.

🎯 Project Goal

Provide students with:

  • Interactive Jupyter notebooks covering control theory fundamentals
  • Reusable Python modules for robot models and controllers
  • Visual simulator to see algorithms in action
  • Zero cost - completely free and open-source

📚 Course Modules

Module 1: PID Control

  • Cruise controller examples
  • PID tuning techniques
  • Discrete-time implementation

Module 2: Robot Models

  • Differential drive kinematics
  • Unicycle model
  • Odometry and wheel encoders
  • Sensor models

Module 3: State-Space Control

  • Linearization techniques
  • Stability analysis (eigenvalues)
  • Consensus algorithms for swarm robotics

Module 4: Control Design

  • Pole placement
  • Controllability & observability
  • Luenberger observers

🚀 Getting Started

Quick Setup (Recommended: Use Virtual Environment)

Windows (Easy Mode):

  1. Double-click setup_venv.bat
  2. Wait for installation to complete
  3. Done! 🎉

Manual Setup (All Platforms):

# Navigate to project
cd control_mobile_robots

# Create virtual environment
python -m venv venv

# Activate it
.\venv\Scripts\activate          # Windows
source venv/bin/activate         # Mac/Linux

# Install dependencies
pip install -r requirements.txt

See detailed instructions: SETUP_INSTRUCTIONS.md

For VSCode Users

  1. Install the Jupyter extension in VSCode
  2. Open any .ipynb file
  3. Click "Select Kernel" → Choose your Python environment
  4. Run cells with Shift+Enter

🎮 Interactive Simulator

NEW! 2D mobile robot simulator with go-to-goal controller:

Quick Launch (Windows):

  • Double-click run_simulator.bat

Manual Launch:

cd simulator
python main.py

Features:

  • Click to set goal positions
  • Watch PID controller in action
  • See odometry drift over time
  • Add obstacles with right-click
  • Real-time visualization

See simulator/README.md for full details.


📖 Learning Path

Option 1: Start with Notebooks

  1. notebooks/module_2_robot_models/01_differential_drive.ipynb
  2. notebooks/module_2_robot_models/02_unicycle_model.ipynb
  3. Then explore Module 1 (PID Control)

Option 2: Start with Simulator

  1. Run run_simulator.bat and play with it
  2. Then dive into notebooks to understand the theory
  3. Come back to simulator to see concepts in action

🛠️ Tech Stack

  • NumPy/SciPy - Numerical computing
  • python-control - Control theory functions
  • Matplotlib - Plotting and visualization
  • Jupyter - Interactive notebooks
  • Pygame - 2D robot simulator ✅

📝 Credits

Based on the Coursera course "Control of Mobile Robots" by Dr. Magnus Egerstedt (Georgia Tech).

This is an independent educational project - not affiliated with Georgia Tech or Coursera.

🤝 Contributing

Contributions welcome! This is a learning project.

📄 License

MIT License - Free for educational use

About

Python simulations and notes for mobile robot control, focusing on kinematics, dynamics, and feedback control.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published