Control System Packer is a lightweight, low-level program to transform energy equations into the compact libraries for control systems.

Overview

Control System Packer

alt text

Reliability Rating Version Licence

Control System Packer is a lightweight, low-level program to transform energy equations into the compact libraries for control systems. Packer supports Python 🐍 , C 💻 and C++ 💻 libraries.

Table of Contents

Features

  • Input the energy equations and get a compact library for the chosen language.
  • Parametrize the system for usage with different parameters
  • Get a control system out of robot's physical equations

Our goal is to make the lives of robotics developers easier, so you can just type in the energy equations and obtain ready-to-use libraries. You can import them straight away into the robot for the control!

Why is our project useful and better than the existing solutions?

  • Our system works with any mechanical model. Every model has it's own general positions and energy equations.
  • Most of the programmers used to code and transform these equations manually, there was no popular tool to solve this issue.
  • Complex control tasks are done in high-level PLs (such as Python), but low-level computers usually work this C or C++. We provide fast and easy transition from Python to C or C++.

Supported languages

Packer now supports 2 types of the language libraries:

  • Python - Python libraries
  • C++ - C++ libraries
  • C - C headers

Getting Started

Cloning a repository

  1. Open the command line interface
  2. Using the command line, access a folder in which you want your project to be saved
  3. Type in:
git clone https://github.com/mirnanoukari/Control-System-Packer.git

Installing the package

You can install the package from our branch symbolical-dynamics/lib/dir by running the command:

sudo python3 setup.py develop # for Linux
python3 setup.py develop # for Windows

Importing phase

Python

Then, you need to import Mechanicalsystem class from euler_lagrange to your mechanical system, use one of our examples in the example folder

from lib.symbolical_dynamics.euler_lagrange import MechanicalSystem

Intialization of your system

name_of_your_system = MechanicalSystem(q,K,P,R)
  • q (generalized coordinates)
  • K (kinetic energy)
  • P (potential energy)
  • R (rayleigh dissipative function)

Or you can assign values to your mechanical system using set functions:

name_of_your_system = MechanicalSystem(q)
name_of_your_system.set_kinetic_energy(K)
name_of_your_system.set_potential_energy(P)
name_of_your_system.set_rayleigh(R)

Getting lagrange equations

name_of_your_system.get_lagrange_equations(simp=True)

The model then produces an equation, and results a combined terms of potential energy and inertia matrix.

Great! Now, your system is initialized with values. You can use them both in Python, C and C++ Below we present the usage of both cases.

print(f'\nEquations of motion:\n{name_of_your_system.Q}')
print(f'\nInertia matrix:\n{name_of_your_system.D}')
print(f'\nGeneralized momenta:\n{name_of_your_system.p}')

C

First of all, we should generate headers from Python code:

name_of_your_system.get_headers()

Now you can simply import these headers, and use built-in functions to find exact value for any numerical arguments:

int main(void) { numerical_combined(2,3,4,5,6,7,8,9,0,12,21,result); // Example of usage of generated headers printf("%d", result[0]) return 0; } ">
#include "numerical_combined.h"
#include <stdio.h>
int main(void) {
   numerical_combined(2,3,4,5,6,7,8,9,0,12,21,result);  // Example of usage of generated headers
   printf("%d", result[0])
   return 0;
}

C++

In your python file, set create_cpp to True and generate an optional cpp class file (euler_lagrange.cpp) which will include all our headers in it:

numerical_combined.get_headers(create_cpp=True)

The file euler_lagrange.cpp will contain ready-to-use functions and you can import it in your code:

#include "euler_lagrange.cpp"

Development

Want to contribute? Check out our contribution policy

Technical stack

Glossary

Packer - a program that allows you to turn input (energy equations) into compact libraries for various programming languages.

Control system - a system, which provides the desired response by controlling the output.

Header - a file containing C language declarations and macro definitions to be shared between several source files.

Library - a collection of non-volatile resources used by computer programs for software development.

Energy equations - potential and kinetic energies equations in symbolic format.

Method of Lagrange multipliers - strategy for finding the local maxima and minima of a function subject to equality constraints.

Further Development

At the moment, the development of a reverse conversion to Python is underway, using cython and the PyBind library. It is planned to compare the execution speeds of methods in C ++ and in Python.

License

MIT

Free Software, Hell Yeah!

You might also like...
Using graph_nets for pion classification and energy regression. Contributions from LLNL and LBNL

nbdev template Use this template to more easily create your nbdev project. If you are using an older version of this template, and want to upgrade to

This code extracts line width of phonons from specular energy density (SED) calculated with LAMMPS.

This code extracts line width of phonons from specular energy density (SED) calculated with LAMMPS.

Openfe - Alchemical free energy calculations for the masses

The Open Free Energy library Alchemical free energy calculations for the masses.

banking system with python, beginner friendly, preadvanced level

banking-system-python banking system with python, beginner friendly, preadvanced level Used topics Functions else/if/elif dicts methods parameters hol

This program generates automatically new folders containing old version of program

Automated Folder Versions Generator by Sergiy Grimoldi - V.0.0.2 This program generates automatically new folders containing old version of something

Birthday program - A program that lookups a birthday txt file and compares to the current date to check for birthdays
Birthday program - A program that lookups a birthday txt file and compares to the current date to check for birthdays

Birthday Program This is a program that lookups a birthday txt file and compares

Time tracking program that will format output to be easily put into Gitlab

time_tracker Time tracking program that will format output to be easily put into Gitlab. Feel free to branch and use it yourself! Getting Started Clon

The program converts Swiss notes into American notes
The program converts Swiss notes into American notes

Informatik-Programmieren Einleitung: Das Programm rechnet Schweizer Noten in das Amerikanische Noten um. Der Benutzer kann seine Note eingeben und der

A program that takes Python classes and turns them into CSS classes.
A program that takes Python classes and turns them into CSS classes.

PyCSS What is it? PyCSS is a micro-framework to speed up the process of writing bulk CSS classes. How does it do it? With Python!!! First download the

Comments
Releases(v.1.0.0)
  • v.1.0.0(Sep 28, 2021)

    We are ready to announce our first release! Refer to the project description in the README.md file.
    Be free to leave the feedback on the current version to help us grow!

    Source code(tar.gz)
    Source code(zip)
Owner
mirnanoukari
mirnanoukari
End-to-End text sumarization, QAs generation using flask.

Help-Me-Read A web application created with Flask + BootStrap + HuggingFace 🤗 to generate summary and question-answer from given input text. It uses

Ankush Kuwar 12 Nov 13, 2022
Age of Empires II recorded game parsing and summarization in Python 3.

mgz Age of Empires II recorded game parsing and summarization in Python 3. Supported Versions Age of Kings (.mgl) The Conquerors (.mgx) Userpatch 1.4

148 Dec 11, 2022
Addon for Blender 2.8+ that automatically creates NLA tracks for all animations. Useful for GLTF export.

PushDownAll An addon for Blender 2.8+ that runs Push Down on all animations, creating NLA tracks for each. This is useful if you have an object with m

Cory Petkovsek 16 Oct 06, 2022
Hypothesis strategies for generating Python programs, something like CSmith

hypothesmith Hypothesis strategies for generating Python programs, something like CSmith. This is definitely pre-alpha, but if you want to play with i

Zac Hatfield-Dodds 73 Dec 14, 2022
Open source style Deep Dream project

DeepDream ⚠️ If you don't have a gpu with cuda, the style transfer execution time will be much longer Prerequisites Python =3.8.10 How to Install sud

Patrick martins de lima 7 May 17, 2022
This is a small Panel applet for the Budgie Desktop to display the battery charge of a connected Bluetooth device.

BudgieBluetoothBattery This is a small Panel applet for the Budgie Desktop to display the battery charge of a connected Bluetooth device. It uses the

Konstantin Köhring 7 Dec 05, 2022
A Python script to convert your favorite TV series into an Anki deck.

Ankiniser A Python3.8 script to convert your favorite TV series into an Anki deck. How to install? Download the script with git or download it manualy

37 Nov 03, 2022
Package to provide translation methods for pyramid, and means to reload translations without stopping the application

Package to provide translation methods for pyramid, and means to reload translations without stopping the application

Grzegorz Śliwiński 4 Nov 20, 2022
CBO uses its Capital Tax model (CBO-CapTax) to estimate the effects of federal taxes on capital income from new investment

CBO’s CapTax Model CBO uses its Capital Tax model (CBO-CapTax) to estimate the effects of federal taxes on capital income from new investment. Specifi

Congressional Budget Office 7 Dec 16, 2022
Yet another Airflow plugin using CLI command as RESTful api, supports Airflow v2.X.

中文版文档 Airflow Extended API Plugin Airflow Extended API, which export airflow CLI command as REST-ful API to extend the ability of airflow official API

Eric Cao 106 Nov 09, 2022
Gives criticality score for an open source project

Open Source Project Criticality Score (Beta) This project is maintained by members of the Securing Critical Projects WG. Goals Generate a criticality

Open Source Security Foundation (OpenSSF) 1.1k Dec 23, 2022
Get a list of content on your Netflix My List that is expiring in the next month or two.

Netflix My List Expiring Movies Annoyed at Netflix for taking away your movies? Now you don't have to be! Installation instructions Install selenium C

24 Aug 06, 2022
The Official interpreter for the Pix programming language.

The official interpreter for the Pix programming language. Pix Pix is a programming language dedicated to readable syntax and usability Q) Is Pix the

Pix 6 Sep 25, 2022
VAST - Visualise Abstract Syntax Trees for Python

VAST VAST - Visualise Abstract Syntax Trees for Python. VAST generates ASTs for a given Python script and builds visualisations of them. Install Insta

Jesse Phillips 2 Feb 18, 2022
UFDR2DIR - A script to convert a Cellebrite UFDR to the original file structure

UFDR2DIR A script to convert a Cellebrite UFDR to it's original file and directo

DFIRScience 25 Oct 24, 2022
Includes Chapters for Python Crash Course session.

python-crash-course Includes Chapters for Python Crash Course session. What will you learn: Python Essentials Creating Server Writing REST API Writing

Vineet Rao 3 Feb 17, 2021
Assembly example for CadQuery

Spindle and vacuum attachment This is a model of the vacuum attachment for my Workbee CNC router. There is a mist spray coming from the left hand side

Marcus Boyd 20 Sep 16, 2022
Ningyu Jia(nj2459)/Mengyin Ma(mm5937) Call Analysis group project(Group 36)

Group and Section Group 36 Section 001 name and UNI Name UNI Ningyu Jia nj2459 Mengyin Ma mm5937 code explanation Parking.py (1) Calculate the rate of

1 Dec 04, 2021
A project to empower needy-students.

Happy Project 😊 A project to empower needy-students. Happy Project is a non-profit initiation founded by IT people from Jaffna, Sri Lanka. This is to

1 Mar 14, 2022
Some out-of-the-box hooks for pre-commit

pre-commit-hooks Some out-of-the-box hooks for pre-commit. See also: https://github.com/pre-commit/pre-commit Using pre-commit-hooks with pre-commit A

pre-commit 3.6k Dec 29, 2022