PyDy, short for Python Dynamics, is a tool kit written in the Python

Overview

PyDy

Latest Released Version anaconda Documentation Status travis-build appveyor gitter

PyDy, short for Python Dynamics, is a tool kit written in the Python programming language that utilizes an array of scientific programs to enable the study of multibody dynamics. The goal is to have a modular framework and eventually a physics abstraction layer which utilizes a variety of backends that can provide the user with their desired workflow, including:

  • Model specification
  • Equation of motion generation
  • Simulation
  • Visualization
  • Benchmarking
  • Publication

We started by building the SymPy mechanics package which provides an API for building models and generating the symbolic equations of motion for complex multibody systems. More recently we developed two packages, pydy.codegen and pydy.viz, for simulation and visualization of the models, respectively. This Python package contains these two packages and other tools for working with mathematical models generated from SymPy mechanics. The remaining tools currently used in the PyDy workflow are popular scientific Python packages such as NumPy, SciPy, IPython, Jupyter, ipywidgets, pythreejs, and matplotlib which provide additional code for numerical analyses, simulation, and visualization.

Installation

We recommend the conda package manager and the Anaconda or Miniconda distributions for easy cross platform installation.

Once Anaconda (or Miniconda) is installed type:

$ conda install -c conda-forge pydy

Also, a simple way to install all of the optional dependencies is to install the pydy-optional metapackage using conda:

$ conda install -c conda-forge pydy-optional

Note that pydy-optional currently enforces the use of Jupyter 4.0, so you may not want to install into your root environment. Create a new environment for working with PyDy examples that use the embedded Jupyter visualizations:

$ conda create -n pydy -c conda-forge pydy-optional
$ conda activate pydy
(pydy)$ python -c "import pydy; print(pydy.__version__)"

Other installation options

If you have the pip package manager installed you can type:

$ pip install pydy

Installing from source is also supported. The latest stable version of the package can be downloaded from PyPi[1]:

$ wget https://pypi.python.org/packages/source/p/pydy/pydy-X.X.X.tar.gz
[1] Change X.X.X to the latest version number.

and extracted and installed[2]:

$ tar -zxvf pydy-X.X.X.tar.gz
$ cd pydy-X.X.X
$ python setup.py install
[2] For system wide installs you may need root permissions (perhaps prepend commands with sudo).

Dependencies

PyDy has hard dependencies on the following software[3]:

[3] We only test PyDy with these minimum dependencies; these module versions are provided in the Ubuntu 20.04 packages. Previous versions may work.
  • 2.7 <= Python < 3.0 or Python >= 3.6
  • setuptools >= 20.7.0
  • NumPy >= 1.16.5
  • SciPy >= 1.3.3
  • SymPy >= 1.5.1
  • PyWin32 >= 219 (Windows Only)

PyDy has optional dependencies for extended code generation on:

and animated visualizations with Scene.display_jupyter() on:

or interactive animated visualizations with Scene.display_ipython() on:

The examples may require these dependencies:

Usage

This is an example of a simple one degree of freedom system: a mass under the influence of a spring, damper, gravity and an external force:

/ / / / / / / / /
-----------------
  |    |     |   | g
  \   | |    |   V
k /   --- c  |
  |    |     | x, v
 --------    V
 |  m   | -----
 --------
    | F
    V

Derive the system:

from sympy import symbols
import sympy.physics.mechanics as me

mass, stiffness, damping, gravity = symbols('m, k, c, g')

position, speed = me.dynamicsymbols('x v')
positiond = me.dynamicsymbols('x', 1)
force = me.dynamicsymbols('F')

ceiling = me.ReferenceFrame('N')

origin = me.Point('origin')
origin.set_vel(ceiling, 0)

center = origin.locatenew('center', position * ceiling.x)
center.set_vel(ceiling, speed * ceiling.x)

block = me.Particle('block', center, mass)

kinematic_equations = [speed - positiond]

force_magnitude = mass * gravity - stiffness * position - damping * speed + force
forces = [(center, force_magnitude * ceiling.x)]

particles = [block]

kane = me.KanesMethod(ceiling, q_ind=[position], u_ind=[speed],
                      kd_eqs=kinematic_equations)
kane.kanes_equations(particles, loads=forces)

Create a system to manage integration and specify numerical values for the constants and specified quantities. Here, we specify sinusoidal forcing:

from numpy import array, linspace, sin
from pydy.system import System

sys = System(kane,
             constants={mass: 1.0, stiffness: 10.0,
                        damping: 0.4, gravity: 9.8},
             specifieds={force: lambda x, t: sin(t)},
             initial_conditions={position: 0.1, speed: -1.0},
             times=linspace(0.0, 10.0, 1000))

Integrate the equations of motion to get the state trajectories:

y = sys.integrate()

Plot the results:

import matplotlib.pyplot as plt

plt.plot(sys.times, y)
plt.legend((str(position), str(speed)))
plt.xlabel('Time [s]')
plt.show()

readme-msd-result.png

Documentation

The documentation for this package is hosted at http://pydy.readthedocs.org but you can also build them from source using the following instructions.

To build the documentation you must install the dependencies:

To build the HTML docs, run Make from within the docs directory:

$ cd docs
$ make html

You can then view the documentation from your preferred web browser, for example:

$ firefox _build/html/index.html

Modules and Packages

Code Generation (codegen)

This package provides code generation facilities. It generates functions that can numerically evaluate the right hand side of the ordinary differential equations generated with sympy.physics.mechanics with three different backends: SymPy's lambdify, Theano, and Cython.

Models (models.py)

The models module provides some canned models of classic systems.

Systems (system.py)

The System module provides a System class to manage simulation of a single system.

Visualization (viz)

This package provides tools to create 3D animated visualizations of the systems. The visualizations utilize WebGL and run in a web browser. They can also be embedded into an IPython notebook for added interactivity.

Development Environment

The source code is managed with the Git version control system. To get the latest development version and access to the full repository, clone the repository from Github with:

$ git clone https://github.com/pydy/pydy.git

You should then install the dependencies for running the tests:

Isolated Environments

It is typically advantageous to setup a virtual environment to isolate the development code from other versions on your system. There are two popular environment managers that work well with Python packages: virtualenv and conda.

The following installation assumes you have virtualenvwrapper in addition to virtualenv and all the dependencies needed to build the various packages:

$ mkvirtualenv pydy-dev
(pydy-dev)$ pip install numpy scipy cython nose theano sympy ipython "notebook<5.0" "ipywidgets<5.0" version_information
(pydy-dev)$ pip install matplotlib # make sure to do this after numpy
(pydy-dev)$ git clone [email protected]:pydy/pydy.git
(pydy-dev)$ cd pydy
(pydy-dev)$ python setup.py develop

Or with conda:

$ conda create -c pydy -n pydy-dev setuptools numpy scipy ipython "notebook<5.0" "ipywidgets<5.0" cython nose theano sympy matplotlib version_information
$ source activate pydy-dev
(pydy-dev)$ git clone [email protected]:pydy/pydy.git
(pydy-dev)$ cd pydy
(pydy-dev)$ conda develop .

The full Python test suite can be run with:

(pydy-dev)$ nosetests

For the JavaScript tests the Jasmine and blanket.js libraries are used. Both of these libraries are included in pydy.viz with the source. To run the JavaScript tests:

cd pydy/viz/static/js/tests && phantomjs run-jasmine.js SpecRunner.html && cd ../../../../../

Benchmark

Run the benchmark to test the n-link pendulum problem with the various backends:

$ python bin/benchmark_pydy_code_gen.py  <# of time steps>

Citation

If you make use of PyDy in your work or research, please cite us in your publications or on the web. This citation can be used:

Gilbert Gede, Dale L Peterson, Angadh S Nanjangud, Jason K Moore, and Mont Hubbard, "Constrained Multibody Dynamics With Python: From Symbolic Equation Generation to Publication", ASME 2013 International Design Engineering Technical Conferences and Computers and Information in Engineering Conference, 2013, 10.1115/DETC2013-13470.

Questions, Bugs, Feature Requests

If you have any question about installation, usage, etc, feel free send a message to our public mailing list or visit our Gitter chatroom.

If you think there’s a bug or you would like to request a feature, please open an issue on Github.

Related Packages

These are various related and similar Python packages:

Comments
  • Motion view dev

    Motion view dev

    This branch contains some major changes in the pydy.viz module. Which I am listing here. I am opening this Pull request to have a final review before it is merged. @moorepants @chrisdembia @jcrist @srjoglekar246

    P.S: I am working on JS-Testing in a separate branch #74 I plan to get this one merged once that is complete, and merged into motion-view-dev.

    New Features:

    • A new, better UI.
    • Integration with IPython notebooks. For rendering the visualizer inside the IPython notebooks, simply call scene.display_ipython from a notebook. (Works only on latest master of IPython).
    • Now rendered objects can be modified from the UI itself(using edit objects button in UI), and new JSON will be generated, which can be viewed by clicking view model button in UI.
    • Added a new property "material" to the rendered shapes (Shape object).
    • Allows rerunning the simulations(after changing the simulation parameters) from the visualizer itself. This feature is partially implemented, but will be fully functional once System class comes in.
    • Javascript backend completely modified. Now it is object oriented using Prototype.js.

    Instructions for building this branch with latest IPython, and testing the new features:

    1. Cloning and installing latest IPython:

      $ git clone https://github.com/ipython/ipython ipython-dev $ cd ipython-dev $ git submodule update $ pip install -e ".[notebook]"

    2. get this branch from git repo:

      $ cd to pydy-repo $ git checkout --track origin/motion-view-dev

    3. Add it to PYTHONPATH.

      $ export PYTHONPATH="/your/pydy/repo/:$PYTHONPATH"

    4. Now you can check out the double_pendulum example.

      • cd to examples/double_pendulum
      • comment out the last line in visualize.py, this one: https://github.com/pydy/pydy/blob/motion-view-dev/examples/double_pendulum/visualize.py#L64
      • open $ ipython notebook
      • from the notebook call:

      from visualize import * scene.display_ipython()

    Please feel free to contact me, if there are any difficulties!!

    Conda method for testing:

    $ conda create -n new-pydy-viz numpy scipy matplotlib theano cython sympy
    $ source activate new-pydy-viz
    (new-pydy-viz)$ conda remove ipython  # conda automatically installs ipython into envs
    (new-pydy-viz)$ git clone https://github.com/ipython/ipython
    (new-pydy-viz)$ cd ipython
    (new-pydy-viz)$ git submodule update
    (new-pydy-viz)$ pip install -e ".[notebook]"
    (new-pydy-viz)$ cd ..
    (new-pydy-viz)$ git clone https://github.com/pydy/pydy
    (new-pydy-viz)$ cd pydy 
    (new-pydy-viz)$ git checkout --track origin/motion-view-dev
    (new-pydy-viz)$ cd examples/double_pendulum
    (new-pydy-viz)$ ipython notebook
    

    TODOS(based on suggestions in this conversation):

    I have copied original suggestions to maintain the context.

    • [x] Update sphinx docs.
    • [x] Users should not need to set PYTHONPATH.
    • [x] Commit an ipython notebook for the double_pendulum example.
    • [x] The model isn't loaded by default, you have to press "Load Simulation". It's nice that the file path is there, but I think it should load the scene when you call "display_ipython".
    • [x] There are two boxes for editing the simulation parameters. There should be only one.
    • [x] Also this needs to handle 0 to 100-1000 parameters. The simple models on a have a few parameters, but most models have hundreds if not thousands. We probably don't want to display them all to the screen, but maybe let the user scroll through them somehow.
    • [x] The time indicator jumps from 1 to 2 decimal places. Make sure to use a formatter so this always has the same # decimals. Also you should set the decimals based on the min and max time. Some simulations may run at 100000 hz, some may run at 10 hz. We will need a way to speed up and slow down the simulation. It should default to running at real time.
    • [x] I liked the time bar indicator. It would be cool to have that and it be drag-able.
    • [x] The loop checkbox is missing. I like that feature.
    • [x] It is not clear what the "Show Model" button is supposed to do. I though it would make the scene load at first but that didn't happen.
    • [ ] I like the object editor, that works nice! how the little menu pops up after selecting the object. The color doesn't seem to change the color. It would be cool if you can rotate and translate the objects relative to their default position here too. I think MG View allows that.
    • [x] The rerun simulation button doesn't seem to work.

    Some final TODOs before merge(as discussed with @chrisdembia ), with priorities:

    • [x] 5 cube
    • [x] 1 decimal places
    • [x] 3 remove mesh from dropdown
    • [x] 4 remove double default from dropdown
    • [x] 2 default dimensions
    • [x] 8 play pause
    • [x] 6 sharp UI
    • [x] 7 blink
    • [x] Integrate with System class
    • [x] Merge JS-Tests
    • [x] Repeated pressing of pause and/or stop have issues.
    • [x] When you rerun simulation, do you have to then press "load simulation"
    • [ ] Wasn't the load sim button a file selection dialog before?
    • [x] If you change model parameters, rerun, and then load the sim it seems like the order of the model parameters changes. If you reload the notebook cell, then the parameter order changed. There is something fishy going on there and you are changing the wrong parameters.
    • [x] The stop button disappears when the simulation is running.
    • [x] Everytime you load a sim in the directory it asks to overwrite the static directory. This shouldn't work like that if you have data files in there. We don't want to erase data files. They need to be preserved so you can load them for future use. We only want to erase the other generated files. What is the purpose of the static dir? Just for data files or also for the html/css/js stuff?
    • [x] Dragging the time slider while the animation is playing doesn't work. Either you should be allowed to do that or it will move you to a new place in the animation and keeping playing from there.
    • [x] If you Play the sim, then pause it, then drag the slider, then play it again doesn't start playing fro where you moved the slider. It plays from where you moved the slider from.
    • [ ] Changing the color doesn't always work for the shape.
    • [x] If the shape is blue the blinking blue isn't that useful to know what you are editing.
    • [x] The stop button dissappears when the sim is playing but reruning the notebook cell doesn't fix it. I would think that reruning the notebook cell would rebuild the widget and everything would be as new.
    • [x] It would be cool to render the parameters with mathjax so they should their mathematical representation in the notebook.
    • [x] If you slide the slider when the animation is not playing, then you press play the animation starts from the initial time instead of where the slider is at.
    • [x] If you select "edit objects" and select a shape then change the color and press apply, the color of the shape does not change. I think this is related to the "default" material only.
    • [ ] I think it would be better if the JSON dialog box was below the scene visualization. Right now, it pushes the scene down the screen, which is odd.
    • [ ] It'd be nice to have xyz labels on the global axes, and ideally the axes/labels could be toggled with a checkbox.
    • [x] The user should be able to modify the initial conditions and time array via the GUI so that it is easier to rerun simulations.
    • [ ] The user should be able to specify custom filenames in the GUI and save a simulation after they fiddled with the simulation parameters via the GUI.
    • [x] Scene.display() no longer seems to open up the scene into a new browser tab, the user has to do it manually.
    opened by tarzzz 66
  • Prototype System class.

    Prototype System class.

    @moorepants, can add your tests to this branch? From this point I'll write code in a test-driven way. It'd be fun to continue to work on this together, but I'm also happy to do the coding and you can review afterwards (if you're busy, etc.).

    • [ ] ~~Edit Scene so that it takes in a System. @tarzzz ?~~
    • [ ] ~~Make KanesMethod and LagrangesMethod derive from a single abstract base class (ABC), perhaps MechanicsMethod. This ABC will be required to provide certain attributes. EDIT: Let's not do this now? [Jason: I'd wait on this too, it isn't necessary]~~
    • [x] Clean up docstrings of System. I'm not sure what to put in the class docstring vs the constructor docstring vs the property docstrings. I am duplicating some information right now. @moorepants @tarzzz @jcrist ?
    • [x] Write tests for constants, initial_conditions, ode_solver
    • [x] Finish tests for complex settings of the specifieds. @moorepants ?
    • [x] Rewrite specifieds to work with the new generate_ode_func args. @chrisdembia, @moorepants ?
    • [x] Finish testing of generate_ode_function, integrate. @moorepants?
    • [ ] Ensure that this class is useful for @jcrist . @jcrist ?
    • [x] Finish setters for constants, specifieds, initial_conditions, ode_solver @chrisdembia
    • [x] Test using the constants, specifieds and initial-conditions properties as dicts
    • [ ] ~~Rewrite so that generate_ode_function takes a system. This may take a lot of work, since right now System is what calls generate_ode_function.~~
    • [x] Make nice sphinx docs.
    • [ ] Convert examples to use System.
    • [ ] ~~Revert generate_ode_function to original call signature and move the specified and constants dict parsing to the System class.~~
    • [ ] All models in codegen.tests.models should return Systems
    enhancement 
    opened by chrisdembia 56
  • Support Python 3

    Support Python 3

    Addresses https://github.com/pydy/pydy/issues/38 I got 2 of the examples (mass_spring_damper, three_link_conical_pendulum) to run with Python 3.4.2.

    • [x] There are no merge conflicts.
    • [x] If there is a related issue, a reference to that issue is in the commit message.
    • [x] Unit tests have been added for the new feature.
    • [x] The PR passes tests both locally (run nosetests) and on Travis CI.
    • [x] All public methods and classes have docstrings. (We use the numpydoc format.)
    • [x] An explanation has been added to the online documentation. (docs directory)
    • [x] The code follows PEP8 guidelines. (use a linter, e.g. pylint, to check your code)
    • [x] The new feature is documented in the Release Notes.
    • [x] The code is backwards compatible. (All public methods/classes must follow deprecation cycles.)
    • [x] All reviewer comments have been addressed.
    enhancement 
    opened by oliverlee 54
  • Fixed static directory creation issue on scene.display()

    Fixed static directory creation issue on scene.display()

    Fixes #156 Fixes #188

    • [ ] There are no merge conflicts.
    • [ ] If there is a related issue, a reference to that issue is in the commit message.
    • [ ] Unit tests have been added for the bug. (Please reference the issue # in the unit test.)
    • [ ] The tests pass both locally (run nosetests) and on Travis CI.
    • [ ] The code follows PEP8 guidelines. (use a linter, e.g. pylint, to check your code)
    • [ ] The bug fix is documented in the Release Notes.
    • [ ] The code is backwards compatible. (All public methods/classes must follow deprecation cycles.)
    • [ ] All reviewer comments have been addressed.
    visualization 
    opened by sahilshekhawat 49
  • Not working across all browsers and OSs

    Not working across all browsers and OSs

    Issue by moorepants from Monday Feb 24, 2014 at 19:16 GMT Originally opened as https://github.com/pydy/pydy-viz/issues/113


    We've found this by trying to run the notebooks in the pydy pycon tutorial.

    One issue is that if you have a notebook open in a non-default system web browser then run scene.display() it tries to open a new tab in the default browser which may or may not be open.

    Here are some notes:

    Windows XP 32bit (in virtual box)

    • Firefox 27.0.1 (set as default) the canvas does not load.
    • Chrome Version 33.0.1750.117 m everything works.

    Windows 7 64 bit (in virtual box)

    • Chrome 35 (canary) works
    • Internet Explorer 11 works but all css styling is missing.
    • Internet Explorer 10 didn't work (but maybe be because tab tried to open in default browser)
    • Firefox 27.0 the canvas is not loading
    • Firefox 17.0 the canvas is not loading

    Windows 7 Professional 64 bit (real machine)

    • Firefox 17.0 ESR works
    • Internet Explorer 10 seems to require admin permissions to open the visualization server (if you don't have them).
    • Internet Explorer 10 opens an unstyled page with no webgl animation. This is to be expected because IE 10 doesn't support webgl.
    • Chrome 43.0.2357.124 m works
    • Firefox 36.0.3 works

    Ubuntu 13.10

    • Firefox 27.0 works
    • Chromium Version 32.0.1700.102 Ubuntu 13.10 (32.0.1700.102-0ubuntu0.13.10.1~20140128.970.1) works

    Ubuntu 14.04 64 bit

    • Chromium 43.0.2357.81 does not work (Webgl isn't available)
    • Chrome
    • Firefox 38 works

    Ubuntu 14.10 (Python 3.4)

    • Chrome 44.0.2403.39 beta (64-bit)

    OSX Mavericks

    • Safari 7 doesn't load the canvas.
    • Works on Firefox 27.0.1
    • Get lots of JS errors (like socket errors) on Chrome 33.0.1750.152

    OSX Yosemite (Python 3.4)

    • Chrome 43.0.2357.124 (64-bit)
    visualization 
    opened by moorepants 46
  • Add Peter's first examples.

    Add Peter's first examples.

    3D n body pendulum, where the bodies can rotate around the massless rods connecting one body to the next one. If they hit each other, they are ideally elastic and slick. Visualisation using pythreejs.

    Please edit below based on the type of PR. It is then the duty of reviewers to check off the items as they are completed. If any questions are not relevant to your particular pull request, a reviewer will simply check it off as done.

    Example

    • [ ] There are no merge conflicts with the master branch.
    • [x] Examples rst file is placed in docs/examples/.
    • [ ] An entry with a 200x200 pixel image has been added to docs/index.rst.
    • [ ] RsT and image filenames are kebab-case (lower case hyphen-separated).
    • [x] jupyter_sphinx RsT directives are used to ensure example is executed on build.
    • [x] jupyter_sphinx ipynb and py download links are included.
    • [ ] The example has adequate text and figures (preferably SVG) explaining the problem.
    • [ ] All reviewer comments have been addressed.
    opened by Peter230655 45
  • Custom bootstrap to place nice with ipython notebook

    Custom bootstrap to place nice with ipython notebook

    bootstrap is already imported for ipython notebook, thus, we don't need to Fixes #209 Fixes #227 Fixes #203

    • [x] There are no merge conflicts.
    • [x] If there is a related issue, a reference to that issue is in the commit message.
    • [ ] Unit tests have been added for the bug. (Please reference the issue # in the unit test.)
    • [ ] The tests pass both locally (run nosetests) and on Travis CI.
    • [ ] The code follows PEP8 guidelines. (use a linter, e.g. pylint, to check your code)
    • [ ] The bug fix is documented in the Release Notes.
    • [x] The code is backwards compatible. (All public methods/classes must follow deprecation cycles.)
    • [x] All reviewer comments have been addressed.
    visualization 
    opened by sahilshekhawat 42
  • modifications in _create_rhs_function

    modifications in _create_rhs_function

    • [x] There are no merge conflicts.
    • [x] If there is a related issue, a reference to that issue is in the commit message.
    • [x] Unit tests have been added for the new feature.
    • [x] The PR passes tests both locally (run nosetests) and on Travis CI.
    • [x] All public methods and classes have docstrings. (We use the numpydoc format.)
    • [x] An explanation has been added to the online documentation. (docs directory)
    • [x] The code follows PEP8 guidelines. (use a linter, e.g. pylint, to check your code)
    • [x] The new feature is documented in the Release Notes.
    • [x] The code is backwards compatible. (All public methods/classes must follow deprecation cycles.)
    • [x] All reviewer comments have been addressed.
    opened by yashu-seth 37
  • Unit tests for pydy/viz/server.py

    Unit tests for pydy/viz/server.py

    • This PR is in correspondence to issue #243 and contains work on a newly added file under the directory structure as : pydy/viz/tests/test_server.py
    • These tests are for the file : pydy/viz/server.py
    opened by kdexd 30
  • Update rolling_ball_uneven_street.rst

    Update rolling_ball_uneven_street.rst

    Please edit below based on the type of PR. It is then the duty of reviewers to check off the items as they are completed. If any questions are not relevant to your particular pull request, a reviewer will simply check it off as done.

    Example

    • [ ] There are no merge conflicts with the master branch.
    • [ ] Examples rst file is placed in docs/examples/.
    • [ ] An entry with a 200x200 pixel image has been added to docs/index.rst.
    • [ ] RsT and image filenames are kebab-case (lower case hyphen-separated).
    • [ ] jupyter_sphinx RsT directives are used to ensure example is executed on build.
    • [ ] jupyter_sphinx ipynb and py download links are included.
    • [ ] The example has adequate text and figures (preferably SVG) explaining the problem.
    • [ ] All reviewer comments have been addressed.
    opened by Peter230655 25
  • Added window resize event listener to the canvas

    Added window resize event listener to the canvas

    Fixes #35 Fixes #202

    • [x] There are no merge conflicts.
    • [x] If there is a related issue, a reference to that issue is in the commit message.
    • [x] Unit tests have been added for the bug. (Please reference the issue # in the unit test.)
    • [x] The tests pass both locally (run nosetests) and on Travis CI.
    • [x] The code follows PEP8 guidelines. (use a linter, e.g. pylint, to check your code)
    • [x] The bug fix is documented in the Release Notes.
    • [x] The code is backwards compatible. (All public methods/classes must follow deprecation cycles.)
    • [x] All reviewer comments have been addressed.
    visualization 
    opened by sahilshekhawat 25
  • Peter230655 snakeboard

    Peter230655 snakeboard

    Please edit below based on the type of PR. It is then the duty of reviewers to check off the items as they are completed. If any questions are not relevant to your particular pull request, a reviewer will simply check it off as done.

    New Feature

    • [ ] There are no merge conflicts.
    • [ ] If there is a related issue, a reference to that issue is in the commit message.
    • [ ] Unit tests have been added for the new feature.
    • [ ] The PR passes tests both locally (run nosetests) and on Travis CI.
    • [ ] All public methods and classes have docstrings. (We use the numpydoc format.)
    • [ ] An explanation has been added to the online documentation. (docs directory)
    • [ ] The code follows PEP8 guidelines. (use a linter, e.g. pylint, to check your code)
    • [ ] The new feature is documented in the Release Notes.
    • [ ] The code is backwards compatible. (All public methods/classes must follow deprecation cycles.)
    • [ ] All reviewer comments have been addressed.

    Bug Fix

    • [ ] There are no merge conflicts.
    • [ ] If there is a related issue, a reference to that issue is in the commit message.
    • [ ] Unit tests have been added for the bug. (Please reference the issue # in the unit test.)
    • [ ] The tests pass both locally (run nosetests) and on Travis CI.
    • [ ] The code follows PEP8 guidelines. (use a linter, e.g. pylint, to check your code)
    • [ ] The bug fix is documented in the Release Notes.
    • [ ] The code is backwards compatible. (All public methods/classes must follow deprecation cycles.)
    • [ ] All reviewer comments have been addressed.

    Example

    • [ ] There are no merge conflicts with the master branch.
    • [ ] Examples rst file is placed in docs/examples/.
    • [ ] An entry with a 200x200 pixel image has been added to docs/index.rst.
    • [ ] RsT and image filenames are kebab-case (lower case hyphen-separated).
    • [ ] jupyter_sphinx RsT directives are used to ensure example is executed on build.
    • [ ] jupyter_sphinx ipynb and py download links are included.
    • [ ] The example has adequate text and figures (preferably SVG) explaining the problem.
    • [ ] All reviewer comments have been addressed.
    opened by Peter230655 0
  • Adding support for Box shapes to dyviz js

    Adding support for Box shapes to dyviz js

    The python code pydy.viz.shapes.py provides support for Box shapes but the type was not supported by the javascript code. This pull request add support for this, including the possibility to edit the parameters in the GUI when selecting Edit Objects.

    I can try to add documentation and unittests but I will wait for your opinion.

    Below is a sample code to test the feature (it might need a "Shift-F5" to reload the javascript from the browser's cache):

    import sympy as sp
    from sympy.physics.mechanics import Point, ReferenceFrame
    from pydy.viz.scene import Scene
    from pydy.viz.shapes import Box
    from pydy.viz.visualization_frame import VisualizationFrame
    
    frame = ReferenceFrame('e')
    point = Point('A')
    
    box = Box(width=4, height=2, depth=0.5, color='blue', name='testbox')
    vizf = VisualizationFrame('vizbox',frame, point, box)
    scene = Scene(frame, point, vizf)
    scene.constants = {}
    scene.states_symbols = [sp.Symbol('x')]
    scene.states_trajectories = np.zeros((2,1))
    scene.times = np.array([0.,1.0])
    scene.display()
    

    New Feature

    • [x] There are no merge conflicts.
    • [ ] If there is a related issue, a reference to that issue is in the commit message.
    • [ ] Unit tests have been added for the new feature.
    • [ ] The PR passes tests both locally (run nosetests) and on Travis CI.
    • [ ] All public methods and classes have docstrings. (We use the numpydoc format.)
    • [ ] An explanation has been added to the online documentation. (docs directory)
    • [ ] The code follows PEP8 guidelines. (use a linter, e.g. pylint, to check your code)
    • [ ] The new feature is documented in the Release Notes.
    • [ ] The code is backwards compatible. (All public methods/classes must follow deprecation cycles.)
    • [ ] All reviewer comments have been addressed.
    opened by ebranlard 3
  • Equation of motion is wrong by Lagrangian method of 2dof scara robot

    Equation of motion is wrong by Lagrangian method of 2dof scara robot

    https://vibgyorpublishers.org/content/ijre/fulltext.php?aid=ijre-5-028 equation of motion of 2dof arm is not same as EOM developed by using lagrangian methond in sympy

    https://nbviewer.org/github/pydy/pydy/blob/master/examples/differential_drive/Differential%20Drive.ipynb

    opened by ThePkverma 1
  • Added Peter's 2d pendulum white noise example.

    Added Peter's 2d pendulum white noise example.

    Please edit below based on the type of PR. It is then the duty of reviewers to check off the items as they are completed. If any questions are not relevant to your particular pull request, a reviewer will simply check it off as done.

    Example

    • [ ] There are no merge conflicts with the master branch.
    • [ ] Examples rst file is placed in docs/examples/.
    • [ ] An entry with a 200x200 pixel image has been added to docs/index.rst.
    • [ ] RsT and image filenames are kebab-case (lower case hyphen-separated).
    • [ ] jupyter_sphinx RsT directives are used to ensure example is executed on build.
    • [ ] jupyter_sphinx ipynb and py download links are included.
    • [ ] The example has adequate text and figures (preferably SVG) explaining the problem.
    • [ ] All reviewer comments have been addressed.
    opened by moorepants 3
  • 2d_pendulum_white_noise

    2d_pendulum_white_noise

    Please edit below based on the type of PR. It is then the duty of reviewers to check off the items as they are completed. If any questions are not relevant to your particular pull request, a reviewer will simply check it off as done.

    Example

    • [ ] There are no merge conflicts with the master branch.
    • [ ] Examples rst file is placed in docs/examples/.
    • [ ] An entry with a 200x200 pixel image has been added to docs/index.rst.
    • [ ] RsT and image filenames are kebab-case (lower case hyphen-separated).
    • [ ] jupyter_sphinx RsT directives are used to ensure example is executed on build.
    • [ ] jupyter_sphinx ipynb and py download links are included.
    • [ ] The example has adequate text and figures (preferably SVG) explaining the problem.
    • [ ] All reviewer comments have been addressed.
    opened by Peter230655 7
Releases(v0.6.0)
  • v0.6.0(Feb 4, 2022)

    0.6.0

    • Dropped support for Python 2.7 and 3.6. [PR #459]
    • Moved chaos pendulum example to Sphinx docs.
    • Added Astrobee example [PR #453]
    • Added the ability to pass optional arguments to the ODE solver in System. [PR #447]
    • Cylinders, Spheres, and Circles loaded via PyThreeJS will appear more round. [PR #440]
    • Added a Carvallo-Whipple bicycle example to the documentation [PR#442]
    • Oldest supported dependencies for Python 3 are aligned with Ubuntu 20.04 LTS. For Python 2, the oldest necessary dependencies are used if the ones for Ubuntu 20.04 LTS are too new. [PR#432]
    • Dropped support for Python 3.5 [PR#429]
    • Improved the README and documentation integration. [PR#424]
    • Moved some examples to Sphinx [PRs#421, #423]
    • jupyter-sphinx enabled for examples in the documentation [PR#419]
    • Added an example with no constraints that uses display_jupyter() for animation. [PR #418]
    • Added an example that has both configuration and motion constraints. [PR #417]
    • display_jupyter() method added to Scene that utilizes pythreejs for animating a system. [PR#416]
    • Remove support for required dependencies prior to those in Ubuntu 18.04 LTS. [PR #415]
    • Recommend installing from Conda Forge [PR#411]
    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Jan 9, 2019)

    • SymPy introduced a backward incompatibility to differentiation Matrices in SymPy 1.2, which remained in SymPy 1.3, see: https://github.com/sympy/sympy/issues/14958. This breaks PyDy's System class, see: https://github.com/pydy/pydy/issues/395. A fix is introduced to handle all support versions of SymPy. [PR #408]
    • Added a new example for anthropomorphic arm. [PR #406]
    • Fixed errors in the differential drive example. [PR #405]
    • Added a new example for a scara arm. [PR #402]
    • Fixed errors due to backwards incompatible changes with various dependencies. [PR #397]
    • ODEFunctionGenerator now works with no constants symbols. [PR #391]
    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(May 30, 2017)

    • Bumped minimum Jupyter notebook to 4.0 and restricted to < 5.0. [PR #381]
    • Removed several deprecated functions. [PR #375]
    • Bumped minimum required hard dependencies to Ubuntu 16.04 LTS package versions. [PR #372]
    • Implemented ThreeJS Tube Geometry. [PR #368]
    • Improved circle rendering. [PR #357]
    • kwargs can be passed from System.generate_ode_function to the matrix generator. [PR #356]
    • Lagrangian simple pendulum example added. [PR #351]
    • Derivatives can now be used as specifies in System. [PR #340]
    • The initial conditions can now be adjusted in the notebook GUI. [PR #333]
    • The width of the viz canvas is now properly bounded in the notebook. [PR #332]
    • Planes now render both sides in the visualization GUI. [PR #330]
    • Adds in more type checks for System.times. [PR #322]
    • Added an OctaveMatrixGenerator for basic Octave/Matlab printing. [PR #323]
    • Simplified the right hand side evaluation code in the ODEFunctionGenerator. Note that this change comes with some performance hits. [PR #301]
    Source code(tar.gz)
    Source code(zip)
Owner
PyDy
Multibody dynamics with Python
PyDy
Perform oocyst segmentation in mercurochrome stained mosquito midgut

Midgut_oocyst_segmentation Perform oocyst segmentation in mercurochrome stained mosquito midguts This oocyst segmentation model also powers the webtoo

Duo Peng 3 Oct 27, 2021
A script to automatically update bot status at GitHub as well as in Telegram channel.

A simple & short repository to show your bot's status in your GitHub README.md file as well as in you channel.

Jainam Oswal 55 Dec 13, 2022
Another Provably Rare Gem Miner 💎 (for Raritygems)

Provably Rare Gem Miner Go (for Rarity) Pull Request is strongly welcome as I don't know anything about Golang/Python/Web3. Usage Install Python 3.x i

朱里 6 Apr 22, 2022
This repository collects nice scripts ("plugins") for the SimpleBot bot for DeltaChat.

Having fun with DeltaChat This repository collects nice scripts ("plugins") for the SimpleBot bot for DeltaChat. DeltaChat is a nice e-mail based mess

Valentin Brandner 3 Dec 25, 2021
Simulation-Based Inference Benchmark

This repository contains a simulation-based inference benchmark framework, sbibm, which we describe in the associated manuscript "Benchmarking Simulation-based Inference".

SBI Benchmark 58 Oct 13, 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
Access Modbus RTU via API call to Sungrow WiNet-S

SungrowModbusWebClient Access Modbus RTU via API call to Sungrow WiNet-S Class based on pymodbus.ModbusTcpClient, completely interchangeable, just rep

8 Oct 30, 2022
Скрипт позволяет выгрузить участников чатов/каналов(по чату для комментариев) и сообщения в различные форматы файлов.

TG-Parser Парсер участников и сообщений из ТГ-Чатов и чатов для комментариев в ТГ-Каналах Возможности Выгрузка участников групп/каналов(по чату для ко

50 Jan 06, 2023
Student Enrollment Analysis System

SEAS Student Enrollment Analysis System Steps to start working: create a user name "seas", host name: local, password: seas, mark all checkbox - go C

Md. Zakaria Kabir 3 Jul 12, 2022
Howell County, Missouri, COVID-19 data and (unofficial) estimates

COVID-19 in Howell County, Missouri This repository contains the daily data files used to generate my COVID-19 dashboard for Howell County, Missouri,

Jonathan Thornton 0 Jun 18, 2022
Utility/Raiding selfbot made by Shell and Roover.

Utility/Raiding selfbot made by Shell and Roover. We are open to suggestions and ideas.

Shell 2 Dec 08, 2021
This is a python package to get wards, districts,cities and provinces in Zimbabwe

Zim-Places Features This is a python package that allows you to search for cities, provinces, and districts in Zimbabwe.Zimbabwe is split into eight p

RONALD KANYEPI 2 Mar 01, 2022
Basic cryptography done in Python for study purposes

criptografia Criptografia básica feita em Python para fins de estudo Converte letras em numeros partindo do indice 0 e vice-versa A criptografia é fei

Carlos Eduardo 2 Dec 05, 2021
Brython (Browser Python) is an implementation of Python 3 running in the browser

brython Brython (Browser Python) is an implementation of Python 3 running in the browser, with an interface to the DOM elements and events. Here is a

5.9k Jan 02, 2023
Find all social media accounts with a username!

Aliens_eye FIND ALL SOCIAL MEDIA ACCOUNTS WITH A USERNAME! OSINT To install: Open terminal and type: git clone https://github.com/BLINKING-IDIOT/Alien

Aaron Thomas 84 Dec 28, 2022
☘️ Projet Voltaire Solver in Python3

☘️ Projet Voltaire Solver in Python3

Bidouffe 8 Dec 02, 2022
Scitizen - Help scientific research for the benefit of mankind and humanity 🔬

Scitizen - Help scientific research for the benefit of mankind and humanity 🔬 Scitizen has been built from the ground up to give everyone the possibi

Pierre CORBEL 21 Mar 08, 2022
Syarat.ID Source Code - Syarat.ID is a content aggregator website

Syarat.ID is a content aggregator website that gathering all informations with the specific keyword: "syarat" from the internet.

Syarat.ID 2 Oct 15, 2021
Improve current data preprocessing for FTM's WOB data to analyze Shell and Dutch Governmental contacts.

We're the hackathon leftovers, but we are Too Good To Go ;-). A repo by Lukas Schubotz and Raymon van Dinter. We aim to improve current data preprocessing for FTM's WOB data to analyze Shell and Dutc

ASReview hackathon for Follow the Money 5 Dec 09, 2021
Build Xmas cards with user inputs

Automatically build Xmas cards with user inputs

Anand 9 Jan 25, 2022