-
Notifications
You must be signed in to change notification settings - Fork 33
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
Update gui scripts #908
Update gui scripts #908
Conversation
When this is done we need to make sure we upgrade "ResourceVersion" so that installer prompts to installResources. @chrisdembia do you think this can be automated using CMake/Ant? |
@jimmyDunne the fix to browse for folder has been on merged a few days back, please test and close/move as needed. Just making sure it's not blocking your progress on GUI scripts. Thank you. |
As discussed elsewhere, I think we should just always prompt to install resources. |
@ayman, folder picker seems to be working on Mac— thanks! All scripts have been tested and are operational. |
@jimmyDunne What are we waiting for on this one? Someone to verify on Windows? |
Yes, someone to test on Windows. |
I started verifying on Windows. Running |
Here are the issues I ran into:
|
It might be good to break this issue for the sprint so that each script is its own fix and verification task. |
@aseth1 I've run |
It would be good when testing these scripts to check first if the resources directory has been set. You can tell what the GUI expects by typing getResourcesDir() in the scripting shell. |
Test report for I was able to run the script and get a plot. I then get the dialog box below after the plot is created. Also, under the directory Artifact: OpenSim 3762598-2018-08-14 |
Test report for The first time I ran this script, the GUI crashed like @aseth1 mentioned. However, after rerunning the script multiple times, including after re-installing the build, it hasn't crashed for me again. It seems to be working properly, all the plots and models are generated according to the script, so I'm not sure what happened that first time. Artifact: OpenSim 3762598-2018-08-14 |
@nickbianco do bones visualize if drag/drop the model file in GUI but not thru scripts? They are supposed to use the same code, and it's possibly a model version/update issue (was it saved in 3.3 or in an earlier version)? Crash logs are usually written to install folder but if the crash happens in native/api side while doing directory change maneuvers maybe found in whatever folder is assumed current by the API at that point (e.g. with model or script or setup file) |
Just a headsup, calling installResources() from the shell as of now does NOT set the resources directory, so calls to getResourcesDir() will still return the value set by whatever last installer that installed these resources. I'll submit a PR to fix that but in the meantime please make sure to type getResourcesDir() in the scripting shell, and if you get unexpected result let me know and I'll suggest a workaround. This issue only affects Windows users where preferences are persistant but not OSX users if they clear preferences on fresh install. |
@aymanhab I just had this issue on Mac where |
I did some digging and the
This file should be removed and have the |
Please merge branch https://github.com/opensim-org/opensim-gui/tree/fix_plot_exportdata for export issues fix |
@jimmyDunne I ran your Artifact: OpenSim f1e93ab-2018-08-21 (AppVeyor build 1.0.1741) |
Test report for I get nearly the same result as reported by @aseth1: the window is tiny and appears on a separate screen from the application window. However, mine appeared in the top left. Artifact: OpenSim f1e93ab-2018-08-21 (AppVeyor build 1.0.1741) |
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.
@jimmyDunne I left some comments related to runTutorialTwo.py
.
ECUPostpathPoint = myModel.getMuscles().get("ECU_post-surgery").getGeometryPath().getPathPointSet().get(i) | ||
# Replace path point from ECU_pre-surgery to ECU_post-surgery | ||
myModel.getMuscles().get("ECU_pre-surgery").getGeometryPath().replacePathPoint(myState,ECUPrepathPoint,ECUPostpathPoint) | ||
myModel.getMuscles().get("ECU_pre-surgery").getGeometryPath().updPathPointSet().clearAndDestroy(); |
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.
No need for ;
in python/jython.
myModel.getMuscles().get("ECU_pre-surgery").getGeometryPath().updPathPointSet().clearAndDestroy(); | ||
pps = myModel.getMuscles().get("ECU_pre-surgery").getGeometryPath().updPathPointSet(); | ||
for i in range(myModel.getMuscles().get("ECU_post-surgery").getGeometryPath().getPathPointSet().getSize()): | ||
pps.cloneAndAppend(myModel.getMuscles().get("ECU_post-surgery").getGeometryPath().getPathPointSet().get(i)); |
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.
It might be nice to use a local variable for the ECU_post-surgery PathPointSet so that these lines are shorter.
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.
Thanks, Chris. I incorporated your suggestions
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.
Looks good.
This seems to be an issue on the GUI side, here. @aymanhab, I am not particularly sure how to approach this one— Is there a way of just plotting what is in the plotter? |
@jimmyDunne I had a fix for that on a branch "fix_plot_exportdata" that I thought you merged into your environment earlier. I went ahead and merged it to master so if you merge from master you should be good. Let me know how it goes. |
@jimmyDunne this branch is way behind master and that may explain some issues that you're running into. Please let me know if it's ok to merge latest master and retry so you're not hitting issues that we resolved already. |
I merged master into this branch, if anybody is working on these scripts please "pull" to avoid downstream issues. |
@aymanhab, would it be possible for you to pull in the latest version of opensim-models? There is a leg39 model that should now be included in the distribution (which is relevant to the GUI scripts). If there is something I can do, please let me know? |
@aymanhab I am using the latest version from sourceforge (4.0-2018-08-30-a33ffc9) and I am getting this same issue. Running plotMuscleFiberLengthAgainstFile.py results in multiple outputs and a warning that 'Exported curves have different domains. Creating 2 files'. Has the 'fix_plot_exportdata' been incorporated into master? If it is only in this branch then I can't test it because I don't (can't) build the GUI locally. |
@jimmyDunne the fix changes the three files, one with bad name, into 2 files, if you remove the Constant function which is only added to show off rather than for useful reason then you should get one file. Please let me know if that works for you. |
@jimmyDunne I updated the models repo and remerged, you should be good to go with latest fixes and models |
Cool, I can see this behavior. 🎉 |
Fixes issue #736
Brief summary of changes
Change getInstallDir() -> getResourcesDir()
Testing I've completed
Tested each script locally
CHANGELOG.md (choose one)