{"id":13751616,"url":"https://github.com/SherbyRobotics/pyro","last_synced_at":"2025-05-09T18:31:45.583Z","repository":{"id":37958284,"uuid":"153139985","full_name":"SherbyRobotics/pyro","owner":"SherbyRobotics","description":"An object-based toolbox for robot dynamic simulation, analysis, control and planning. ","archived":false,"fork":true,"pushed_at":"2024-05-28T20:41:38.000Z","size":26745,"stargazers_count":40,"open_issues_count":11,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-29T14:59:35.950Z","etag":null,"topics":["analysis","closed-loop-control","control-systems","dynamic-programming","dynamics","optimal","optimal-control","planning-algorithms","python","reinforcement-learning","robotics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"alx87grd/AlexRobotics","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SherbyRobotics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-15T15:45:09.000Z","updated_at":"2024-05-29T14:59:35.951Z","dependencies_parsed_at":"2023-02-10T17:15:52.207Z","dependency_job_id":"b26e1230-687f-47ac-8c7d-273ac43f1363","html_url":"https://github.com/SherbyRobotics/pyro","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SherbyRobotics%2Fpyro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SherbyRobotics%2Fpyro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SherbyRobotics%2Fpyro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SherbyRobotics%2Fpyro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SherbyRobotics","download_url":"https://codeload.github.com/SherbyRobotics/pyro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253303024,"owners_count":21886873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","closed-loop-control","control-systems","dynamic-programming","dynamics","optimal","optimal-control","planning-algorithms","python","reinforcement-learning","robotics"],"created_at":"2024-08-03T09:00:50.014Z","updated_at":"2025-05-09T18:31:42.393Z","avatar_url":"https://github.com/SherbyRobotics.png","language":"Python","readme":"# Pyro \n\nAn object-based toolbox for robot dynamic simulation, analysis, control and planning. \n\n### A collection of dynamic systems:\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\n    \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/rocket.gif\" alt=\"rocket\" width=\"380\"/\u003e\n    \u003c/th\u003e\n    \u003cth\u003e\n    \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/3dofarm.gif\" alt=\"cartpole\" width=\"380\"/\u003e\n    \u003c/th\u003e \n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/cartpole.gif\" alt=\"cartpole_swing_up\" width=\"380\"/\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/suspension.gif\" alt=\"mass-spring\" width=\"380\"/\u003e\n    \u003c/td\u003e \n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### A collection of controller synthesis and planning tools:\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\n      Computed torque controller\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/ctc.png\" alt=\"ctc\" width=\"360\"/\u003e\n    \u003c/th\u003e\n    \u003cth\u003e\n      Sliding mode controller\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/smc.png\" alt=\"smc\" width=\"360\"/\u003e\n    \u003c/th\u003e \n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\n      Dynamic programming\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/J.gif\" alt=\"cost2go\" width=\"360\"/\u003e\n    \u003c/th\u003e\n    \u003cth\u003e\n      Optimal torque policy\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/pi.gif\" alt=\"policy\" width=\"360\"/\u003e\n    \u003c/th\u003e \n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\n      Rapidly-exploring random tree planning\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/rrt.png\" alt=\"rrt\" width=\"360\"/\u003e\n    \u003c/th\u003e\n    \u003cth\u003e\n      Direct collocation trajectory optimisation\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/doublependulum.gif\" alt=\"doublependulum\" width=\"360\"/\u003e\n    \u003c/th\u003e \n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### A collection of analysis tools:\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\n      Simulation (computing trajectories)\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/traj.png\" alt=\"traj\" width=\"360\"/\u003e\n    \u003c/th\u003e\n    \u003cth\u003e\n      Phase plane analysis\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/pp.png\" alt=\"phase-plane\" width=\"360\"/\u003e\n    \u003c/th\u003e \n  \u003c/tr\u003e\n    \u003ctr\u003e\n    \u003cth\u003e\n      Generating animated simulations\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/plane.gif\" alt=\"ani\" width=\"360\"/\u003e\n    \u003c/th\u003e\n    \u003cth\u003e\n      Robot arm manipulability ellipsoid\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/elp.png\" alt=\"elp\" width=\"360\"/\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\n      Bode plot or output/input\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/bode.png\" alt=\"bode\" width=\"360\"/\u003e\n    \u003c/th\u003e\n    \u003cth\u003e\n      Pole zero map of output/input\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/pz.png\" alt=\"pz\" width=\"360\"/\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\n      Modal analysis (mode 1)\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/mode1.gif\" alt=\"mode1\" width=\"360\"/\u003e\n    \u003c/th\u003e\n    \u003cth\u003e\n      Modal analysis (mode 2)\n      \u003cimg src=\"https://www.alexandregirard.com/IMG/pyro/mode2.gif\" alt=\"mode2\" width=\"360\"/\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### Unified by a standardized *dynamic system*, *controller* and *planner* classes hierarchy\n\nThe concept of this toolbox is a hierachy of *dynamic system* objects, from the most generic representation (any non-linear differential equations) to more system specific representations such as mechanical system (second order equations), linear state space, manipulator equations, etc. This structure is then leveraged by analysis tools, from generic tools that work for all sub-class of dynamic systems such as running simulation and phase-plane analysis, to system-specific tools that leverage specific system propreties such as modal analysis for linear sub-class:\n\n\u003cimg width=\"800\" src=\"https://www.alexandregirard.com/IMG/pyro/classes.png\" class=\"center\"\u003e\n\nThe core of the library is a mother *dynamic system* class defined by a differential equation $\\dot{x} = f(x,u,t)$, and optionnaly an output equation $y = h(x,u,t)$ and a foward kinematic equation that is used for generating animations:\n\n\u003cimg width=\"500\" src=\"https://www.alexandregirard.com/IMG/pyro/dynamic.png\" class=\"center\"\u003e\n\n# How to use #\n\nTo learn how to use pyro, see the following notebook tutorials hosted on colab:\n\n1.   [The Dynamic System class and basic functionnality](https://colab.research.google.com/drive/18eEL-n-dv9JZz732nFCMtqMThDcfD2Pr?usp=sharing)\n2.   [Creating a custom dynamic class](https://colab.research.google.com/drive/1ILfRpL1zgiQZBOxwtbbpe0nl2znvzdWl?usp=sharing)\n3.   [Closed-loop system and controllers objects](https://colab.research.google.com/drive/1mog1HAFN2NFEdw6sPudzW2OaTk_li0Vx?usp=sharing)\n4.   The Linear System class (comin soon..)\n4.   The Mechanical System class (coming soon..)\n5.   [The Manipulator Robot class](https://colab.research.google.com/drive/1OILAhXRxM1r5PEB1BWaYtbR147Ff3gr1?usp=sharing)\n\nAlso see exemples scripts in pyro/examples/ \n\nand tutorial video (in french) on youtube: [here](https://youtube.com/playlist?list=PL6adNeJ0A8UtD_HQJTv6FHalnj0t7RyVa\u0026si=SoZGOcYpsjLWvw27)\n\n\n# Installation #\n\n### Dependencies ####\nPyro is built only using core python librairies: \n* numpy\n* scipy\n* matplotlib\n\n### Using in Colab ###\n\n```\n!git clone https://github.com/SherbyRobotics/pyro\nimport sys\nsys.path.append('/content/pyro')\nimport pyro\n```\n\n### Using with Anaconda and Spyder IDE ###\n\n#### 1. Download anaconda python distribution \nDownload anaconda (including spyder IDE) available here: https://www.anaconda.com/products/individual\n\n#### 2. Dowload pyro source code.\noption a) Using git to clone the repo:\n```bash\ngit clone https://github.com/SherbyRobotics/pyro.git\n```\nin the folder of your choice.\n\noption b) Download the .zip using the Code/Download Zip link at the top of this page, and then unzip in the folder of your choice.\n\n#### 3. Add the pyro folder to the pythonpath \noption a) [Easy spyder IDE only] Add it this the spyder menu at python/PYTHONPATH manager. \n\nIn order to run pyro in the terminal directly of in another IDE like VS code, option b) or c) should be used.\n\noption b) [conda]\n```bash\nconda develop /PATH/TO/PYRO\n```\n\noption c) [pip]\nGo to the root directory of the pyro folder and run:\n```bash\npython -m pip install -e .\n```\n\n##### Graphical backend debuging \n\nBy default pyro will try to use matplotlib Qt5Agg backend and interactive mode. You can modify the default graphical behavior by modifying the headers of the file pyro/analysis/graphical.py\nIn spyder IDE, you cand also change the graphics backend in the menu at python/Preferences/IPython console/Backend. Inline does not allow animations, it is best to use Automatic (for Windows and Ubuntu) or OS X (for Mac).\n\n\n# Pyro tools list #\n\n### Dynamic objects ###\n\n- Continuous Dynamic system : $\\dot{x} = f(x,u)$\n- Linear System : $\\dot{x} = A x + B u $\n  - Transfer function \n  - Exemples: mass-spring-damper\n- Mechanical System : $H(q)\\ddot{q} + C(\\dot{q},q)\\dot{q} = \\sum F $\n  - Manipulator Robot : $\\dot{r} = J(q) \\dot{q}$\n    - Exemples: two link plananr robot\n    - Exemples: five link plannar robot\n    - Exemples: three link robot\n  - Exemples: single pendulum\n  - Exemples: double pendulum\n  - Exemples: cart-pole\n  - Exemples: planar drone\n  - Exemples: rocket\n- Exemples: bicycle model (planar vehicle)\n\n\n### Controller objects ###\n\n- Linear\n- PID\n- LQR\n- Computed-Torque\n- Sliding-mode controller\n- End-point impedance controller for robot arms\n- End-point trajectory controller for robot arms\n- Tabular look-up table controller (generated by the value-iteration algorithm)\n\n### Planner objects ###\n\n1. RRT tree search\n2. Direct collocation trajectory optimisation\n3. Dynamic programming and value-iteration \n\n\n### Analysis tool ###\n\n- Copmuting simulation\n- Phase-plane analysis\n- Graphical animated output of the simulations\n- Cost function computation\n- Linearisation (from any dynamic class to the state-space class)\n- Modal analysis\n- Pole/zero computation\n- Bode plot\n- Reachability\n\n\u003c!---\n## Development ##\n\n### Installing for development ###\n\nFrom the root of a clone of this repository, run:\n\n```bash\npython -m pip install -e .\n```\n\nThis will install pyro in \"editable\" mode, so any changes made in the working\ndirectory will be taken into account when importing the pyro module.\n\n### Running tests ###\n\nNote: most tests are currently broken.\n\nRunning the test suite requires installing [pytest](https://docs.pytest.org/).\nTo run all tests:\n\n```bash\npytest examples/projects/tests\n```\n\nBy running this command from the top level of the pyro repository, `pyro` will\nbe imported directly from the local folder.\n\n---\u003e\n","funding_links":[],"categories":["Open-Source Software"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSherbyRobotics%2Fpyro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSherbyRobotics%2Fpyro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSherbyRobotics%2Fpyro/lists"}