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
A collection of existing KGQA datasets in the form of the huggingface datasets library, aiming to provide an easy-to-use access to them.

KGQA Datasets Brief Introduction This repository is a collection of existing KGQA datasets in the form of the huggingface datasets library, aiming to

Semantic Systems research group 21 Jan 06, 2023
Solutions for the Advent of Code 2021 event.

About ๐Ÿ“‹ This repository holds all of the solution code for the Advent of Code 2021 event. All solutions are done in Python 3.9.9 and done in non-real

robert yin 0 Mar 21, 2022
Whole-day timezone comparison

Timezone Converter Compare a full day of your local timezone with foreign ones $ timezone-converter tijuana --zone $ timezone-converter tijuana new_yo

Iago Alonso 12 Nov 24, 2022
This project is about for notifying moderators about uploaded photos on server.

This project is about for notifying moderators (people who moderate data from photos) about uploaded photos on server.

1 Nov 24, 2021
A free micro-blog written in Python and powered by Heroku. *Merge requests are appreciated!*

Background Hobo is an ultra-lightweight blog engine written in Python. It has two dependencies, fully integrated into the codebase with no additional

Andrew Nelder 48 Jan 28, 2021
to learn how to do pull request and do contribution to other's repo

Hacktoberfest-2021 - open-source-contribution An Open Source repository to Teach people How to contribute to open sources. ๐Ÿ’ฅ ๐Ÿ”ฅ JOIN PVX PROGRAMMING

Shubham Rawat 82 Dec 26, 2022
Download and archive entire usenet newsgroups over NNTP.

Usenet Archiving Tool This code is for archiving Usenet discussions, not downloading files. Newsgroup posts are saved under the authors name and email

Corey White 2 Dec 23, 2021
A parallel branch-and-bound engine for Python.

pybnb A parallel branch-and-bound engine for Python. This software is copyright (c) by Gabriel A. Hackebeil (gabe.hacke

Gabriel Hackebeil 52 Nov 12, 2022
Deis v1, the CoreOS and Docker PaaS: Your PaaS. Your Rules.

This repository (deis/deis) is no longer developed or maintained. The Deis v1 PaaS based on CoreOS Container Linux and Fleet has been replaced by Deis

Deis 6.1k Jan 04, 2023
A place where the most basic, basic of python coding exists

python-basics A place where the most basic, basic of python coding exists As you can see, there are four folders and the best order to read is: appeti

Chuqin 2 Oct 05, 2022
This repo created to complete the task HACKTOBER 2021, contribute now and get your special T-Shirt & Sticker. TO SUPPORT OWNER PLEASE PRESS STAR BUTTON

โค THIS REPO WILL CLOSED IN 31 OCT 00:00 โค This repository will automatically assign the hacktoberfest and hacktoberfest-accepted labels to all submitt

Rajendra Rakha 307 Dec 27, 2022
the classic version Of torrentleechx #Unmaintained #Archived

TorrentleechX-Classic Old Modified Version Repo #Unmaintained #Archived for support join here working example group Leech Here For Any Issues/Imroveme

XcodersHub 18 Jan 30, 2022
A web UI for managing your 351ELEC device ROMs.

351ELEC WebUI A web UI for managing your 351ELEC device ROMs. Requirements Python 3 or Python 2.7 are required. If the ftfy package is installed, it w

Ben Phelps 5 Sep 26, 2022
Data wrangling & common calculations for results from qMem measurement software

qMem Datawrangler This script processes output of qMem measurement software into an Origin ยฎ compatible *.csv files and matplotlib graphs to quickly v

Julian 1 Nov 30, 2021
The earliest beta version of pytgcalls on Linux x86_64 and ARM64! Use in production at your own risk!

Public beta test. Use in production at your own risk! tgcalls - a python binding for tgcalls (c++ lib by Telegram); pytgcalls - library connecting pyt

Il'ya 21 Jan 13, 2022
To lazy to read your homework ? Get it done with LOL

LOL To lazy to read your homework ? Get it done with LOL Needs python 3.x L:::::::::L OO:::::::::OO L:::::::::L L:::::::

KorryKatti 4 Dec 08, 2022
An example of python package

An example of python package Why use packages? It is a good practice to not code the same function twice, and to reuse common code from one python scr

10 Oct 18, 2022
My custom Fedora ostree build with sway/wayland.

Ramblurr's Sway Desktop This is an rpm-ostree based minimal Fedora developer desktop with the sway window manager and podman/toolbox for doing develop

Casey Link 1 Nov 28, 2021
An integrated library for checking email if it is registered on social media

An integrated library for checking email if it is registered on social media

Sidra ELEzz 13 Dec 08, 2022
Generate a wordlist to fuzz amounts or any other numerical values.

Generate a wordlist to fuzz amounts or any other numerical values. Based on Common Security Issues in Financially-Oriented Web Applications.

Ivan ล incek 3 Oct 14, 2022