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
Transform your boring distro into a hacking powerhouse.

Pentizer Transform your boring distro into a hacking powerhouse. Pentizer is a personal project that imports Kali and Parrot repositories in any Debia

Michail Tsimpliarakis 2 Nov 05, 2021
Desenvolvendo as habilidades básicas de programação visando a construção de aplicativos por meio de bibliotecas apropriadas à Ciência de Dados.

Algoritmos e Introdução à Computação Ementa: Conceitos básicos sobre algoritmos e métodos para sua construção. Tipos de dados e variáveis. Estruturas

Dyanna Cruz 1 Jan 06, 2022
Singularity Containers on Apple M1 (ARM64)

Singularity Containers on Apple M1 (ARM64) This is a repository containing a ready-to-use environment for singularity in arm64 (M1). It has been prepa

Manuel Parra 4 Nov 14, 2022
Placeholders is a single-unit storage solution for your Frontend.

Placeholder Placeholders is a single-unit file storage solution for your Frontend. Why Placeholder? Generally, when a website/service requests for fil

Tanmoy Sen Gupta 1 Nov 09, 2021
Team Hash Brown Science4Cast Submission

Team Hash Brown Science4Cast Submission This code reproduces Team Hash Brown's (@princengoc, @Xieyangxinyu) best submission (ee5a) for the competition

3 Feb 02, 2022
Kellogg bad | Union good | Support strike funds

KelloggBot Credit to SeanDaBlack for the basis of the script. req.py is selenium python bot. sc.js is a the base of the ios shortcut [COMING SOON] Set

407 Nov 17, 2022
Analyzes crypto candles over a set time period and then trades based on winning patterns found

patternstrade Analyzes crypto candles over a set time period and then trades based on winning patterns found. Heavily customizable. Warning: This was

ConnorCreate 14 May 29, 2022
Python Library to get fast extensive Dummy Data for testing

Dumda Python Library to get fast extensive Dummy Data for testing https://pypi.org/project/dumda/ Installation pip install dumda Usage: Cities from d

Oliver B. 0 Dec 27, 2021
Python code for YouTube videos.

#This is a open source project. Python 3 These files are mainly intended to accompany my series of YouTube tutorial videos here, https://www.youtube.c

Joe James 1.3k Dec 26, 2022
Render to print for blender 2.9+

render_to_print_blender_addon ** render2print: Blender AddOn for Blender 2.90.0+ ** Calculates camera parameters to allow printing a rendered image to

5 Nov 19, 2021
Extend the maya channel box with searchability and colour

channel-box-plus will add search-ability over its attributes, and it will colour user defined attributes, making them easier to distinguish.

Robert Joosten 12 Jun 08, 2022
Exactly what it sounds like, which is something rad

EyeWitnessTheFitness External recon got ya down? That scan prevention system preventing you from enumerating web pages? Well look no further, I have t

Ellis Springe 18 Dec 31, 2022
B-Pkg is a simple tool in python for installing all basic package in termux

Basic-Pkg 👉🏻 Basic-Pkg 👈🏻 B-Pkg is a simple tool in python for installing all basic package in termux This is my first tool, I hope you will like

Macgaiver 3 Oct 21, 2021
This is a batch script created to WEB-DL.

widevine-L3-WEB-DL-Script This is a batch script created to WEB-DL. Works well with .mpd files , for m3u8 please use n_m3u8 program (not included in t

Paranjay Singh 312 Dec 31, 2022
Python bindings for `ign-msgs` and `ign-transport`

Python Ignition This project aims to provide Python bindings for ignition-msgs and ignition-transport. It is a work in progress... C++ and Python libr

Rhys Mainwaring 3 Nov 08, 2022
A repository for all ZenML projects that are specific production use-cases.

ZenFiles Original Image source: https://www.goodfon.com/wallpaper/x-files-sekretnye-materialy.html And naturally, all credits to the awesome X-Files s

ZenML 66 Jan 06, 2023
Backend Interview Challenge

Inspect HOA backend challenge This is a simple flask repository with some endpoints and requires a few more endpoints. It follows a simple MVP (model-

1 Jan 20, 2022
A custom advent of code I am completing

advent-of-code-custom A custom advent of code I am doing in python. The link to the problems I am solving is here: https://github.com/seldoncode/Adven

Rocio PV 2 Dec 11, 2021
Python script to autodetect a base set of swiftlint rules.

swiftlint-autodetect Python script to autodetect a base set of swiftlint rules. Installation brew install pipx

Jonathan Wight 24 Sep 20, 2022