Skip to content

PyBricks Stewart Platform. OpenCV-based ball recognition.

License

Notifications You must be signed in to change notification settings

ivorjawa/StewartPlatform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

I wanted to learn more about how a helicopter works, specifically how the rotors are controlled. So I built a rotor-head out of LEGO and did some math. I also relearned a lot about typesetting equations I knew about a decade ago. I also learned about a method of helicopter control known as cyclic-collective pitch mixing, which is the algorithm I'll be discussing here.

For more detailed information, see RotorHead.ipynb

Helicopter

This project is dependent on PyBricks 3.4.0 for rotor.py and OpenCV for rotormath.py. For a full list of packages installed as I type this, see pip_freeze.txt.

PyBricks links

Building

I used the 5.3 release of the GNU ARM Embedded Toolchain

Put the toolchain binary in your path and it should build without issue. export PATH="/Users/kujawa/Projects/chs/gcc-arm-none-eabi-5_3-2016q1/bin/:$PATH"

(needs GNU ARM Embedded Toolchain v10-2020-q4 for 3.x https://github.com/pybricks/pybricks-micropython/blob/master/CONTRIBUTING.md)

Code Manifest

  • RotorHead.ipynb: a jupyter notebook describing the project
  • controllers.py: game controller interface
  • cvgraph.py: opencv-based animation convenience funcetions
  • joycode.py: a lightweight wire protocol for transmitting game controller data to the hub
  • linear.py: a translation layer to make linear algebra identical under numpy and pybricks
  • rotor.py: the control program that runs on the Technic Hub
  • rotorbase.py: base station that decodes gamepad data and sends it to the hub
  • rotormath.py: an animated simulation of the algorithm
  • swashplate.py: the code that does the actual swashplate calculation
  • sympy_test.ipynb: a sandbox notebook used for relearning sympy

About

PyBricks Stewart Platform. OpenCV-based ball recognition.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published