-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Motion view dev #82
Motion view dev #82
Conversation
generating scene information, and other for generating simulation information
one for simualtion data and another for scene data. Both are now saved in different files!
Shape material
@chrisdembia what if I create a separate function, like For the time being a user uses KanesMethod, he can use either of them, but if he uses Langranges, he is bound to use the one which requires four args(2 specifieds, 2 states) instead of the one which requires one arg(system). Editing the existing |
good idea! On Sun, Aug 10, 2014 at 11:01 AM, Tarun Gaba [email protected]
|
self.generate_visualization_json(system.states, | ||
system.constants_symbols, | ||
system.integrate(), | ||
system.constants, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisdembia I think, I am giving the wrong arguments here(It is giving an error with modified double_pendulum example). Can you help me figuring them out?
I need in the args in following order:
dynamicsymbols, constant_symbols, dynamics_values_numerical, constant_values_numerical
what attributes in system correspond to the above mentioned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind, fixed it. I should be using system.constants.values() as the fourth arg.
Well, this adds System to Scene. Some brief desc. of new implementations: If KanesMethod is being used, a user can use either generate_visualization_json or generate_visualization_json_system. If he prefers the latter one, and provides system as arg, we can re-integrate the system, hence the re-run simulations actually re-integrates the system. I have implemented this in double_pendulum example Some tests, sphinx docs, and it is good to go in. (well need to merge js-testing here too!) |
Thanks for working on this so quickly Tarun! I will check it out later today. |
Js testing
if self.system is not None: | ||
#update system constants | ||
self.system.constants = dict(zip(self.system.constants, self.constant_values)) | ||
self.generate_visualization_json_system(self.system) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisdembia If system is provided, this part of code is responsible for re-run
@moorepants, @tarzzz seems to have fixed most of the bugs we brought up, and re-running a simulation works now. Do you want to give this another spin? |
Great! I just tried it. It now seems highly functional. Even the rerun button seems to work correctly! Nice! This seems ready to be merged to master now that it is functionaly and the major bugs are squashed. @tarzzz Please make issues for all of the remaining non-critical bugs and feature requests. Also the example problem is now printing an array to the screen. Not sure where that is. Please remove the print statement. |
FYI, the show json button seems to be broken on the non-notebook view, i.e. scene.display(). It shows a garbled codemirror form. |
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 @srjoglekar246P.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:
scene.display_ipython
from a notebook. (Works only on latest master of IPython).edit objects
button in UI), and new JSON will be generated, which can be viewed by clickingview model
button in UI.Shape
object).System
class comes in.Instructions for building this branch with latest IPython, and testing the new features:
Cloning and installing latest IPython:
$ git clone https://github.com/ipython/ipython ipython-dev
$ cd ipython-dev
$ git submodule update
$ pip install -e ".[notebook]"
get this branch from git repo:
$ cd to pydy-repo
$ git checkout --track origin/motion-view-dev
Add it to PYTHONPATH.
$ export PYTHONPATH="/your/pydy/repo/:$PYTHONPATH"
Now you can check out the
double_pendulum
example.$ ipython notebook
from visualize import *
scene.display_ipython()
Please feel free to contact me, if there are any difficulties!!
Conda method for testing:
TODOS(based on suggestions in this conversation):
I have copied original suggestions to maintain the context.
Some final TODOs before merge(as discussed with @chrisdembia ), with priorities:
System
class