Git Product home page Git Product logo

magnusoy / balancing-platform Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 4.0 26.12 MB

The project is about making a regulation loop to balance a ball on a platform. As a result of this, the model is based on a Stewart platform with three degrees of freedom (pitch, roll, heave).

Home Page: https://github.com/magnusoy/Balancing_Platform

License: MIT License

Python 95.37% C++ 1.44% C 2.74% Fortran 0.11% Tcl 0.31% PowerShell 0.02% Batchfile 0.02%
stewart-platform engine balance control-systems computer-vision inverse-kinematics plc-programming opencv-python

balancing-platform's Introduction

Balancing platform

This project is in the subject Industrial Management Systems at NTNU and shall provide the basis for the final grade. The project is about making a regulation loop to balance a ball on a platform. As a result of this, the model is based on a Stewart platform with three degrees of freedom (pitch, roll, heave). The platform is moved by three DC servomotors located in each corner of an equal-sided triangle with the center as a trade fair. Furthermore, in order for the engines to lift the platform, a disc is attached to the shaft with an offset from the center. The motion of the three motors is determined by two PID controllers in a PLC, which gives an assertion calculated by errors and parameters. Finally, the assignment is turned into positions of the engines through a position matrix.

The project will be presented as part of the oral exam in the subject. The report is written according to the given technical report templates, and contains images and text from theory, methodology and the results achieved.

Prerequisites

You will need Python 3 for using the provided files. Also you will need to install all the dependencies listed below.

pip install -r /path/to/requirements.txt

or

pip install opencv-python==3.4.3.18
pip install scipy==1.1.0
pip install numpy==1.15.2
pip install pymodbus==2.1.0
pip install vpython==7.4.7
pip install matplotlib==3.0.0
pip install pygame==1.9.4

Installing and usage

Clone or download project as zip in any directory. Find correct HSV settings for ball detection with morphological_transform file. Adjust the sliders until the ball is the only thing white and crop the frame til the platform corners. Set the new values in the video_processing file and finish with running main.py

Example

Each class can be executed on their own for testing purposes.

For single parts:

python joystick.py
python modbus_communication.py
python video_processing.py
python visualization.py

For utility parts:

python graphs.py
python inverse_kinematics.py
python morphological_transformation.py

For whole project:

python main.py

or if you want to run an 3D visualization model simultaneously.

python main.py
python visualization.py

Output

Built With

Contributing

If you want to contribute or find anything wrong, please create a Pull request, or issue addressing the change, or issue.

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Libraries

OpenCV

Numpy

Vpython

Matplotlib

PyModbus

PyGame

balancing-platform's People

Contributors

magnusoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.