Skip to content

Conversation

aymanhab
Copy link
Member

Backport changes to scaling from OpenSim 3.3 code base. This amounts to scaling ligaments by invoking their (PreScale, Scale, PostScale methods) and beefing up the test case to check that ligaments are scaled as expected.

@jenhicks
Copy link
Member

Fixes #186

@aymanhab
Copy link
Member Author

@chrisdembia travis has been failing since yesterday trying to get swig from http://prdownloads.sourceforge.net/swig/$SWIG.tar.gz do we have a workaround, different location to obtain swig or just disable wrapping for now since these PRs have no API changes? Thanks.

@chrisdembia
Copy link
Member

Is the failure sporadic? The travis-ci/push test passed. I restarted the build. Yes it would be a good idea to download swig from somewhere else; I guess we can't rely on sourceforge. At one point, we briefly downloaded swig from github. That was a good idea because then if github is down, we have more issues than just not being able to download swig. I don't know why I reverted the changes.

@sherm1
Copy link
Member

sherm1 commented Jul 17, 2015

I believe the problem was an outage yesterday on sourceforge. I think it is fixed now.

@aymanhab
Copy link
Member Author

Sherm,

Apparently it isn't fixed yet as travis just failed to build master for the
same reason.

-Ayman

On Fri, Jul 17, 2015 at 10:51 AM, Michael Sherman notifications@github.com
wrote:

I believe the problem was an outage yesterday on sourceforge. I think it
is fixed now.


Reply to this email directly or view it on GitHub
#538 (comment)
.

@sherm1
Copy link
Member

sherm1 commented Jul 17, 2015

Apparently it isn't fixed yet as travis just failed to build master for the
same reason

Yes, I see I was wrong. Sourceforge is back up but prdownloads.sourceforge.net is still dead.

@aymanhab
Copy link
Member Author

@aseth1 this ports the scaling of ligaments and test case from 3.3 branch. Please review and let me know if ready to merge. Thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tool should not be called "subject"! Becomes confusing to read below.

@aymanhab
Copy link
Member Author

@aseth1 Changes made per your suggestion (name of local variable for tool and move of check/assert block). The test case is validated against manual inspection for a simple block with attached ligaments. There's no existing code that would have scaled ligament resting length properly, the scaling of geometryPath for this model is trivial and has been visually verified by @jimmyDunne and myself. Please let me know if you have any further feedback or if we should merge. Thanks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually remove the file or just cause it to be empty?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct, it empties the file rather than removes it. I'll update the comment(s) accordingly.

@aseth1
Copy link
Member

aseth1 commented Jul 27, 2015

There's no existing code that would have scaled ligament resting length properly, the scaling of geometryPath for this model is trivial and has been visually verified by @jimmyDunne and myself.

I forgot about the resting length too. If the std has been verified to have the correct resting length (and it isn't equivalent to the unscaled) then that's OK.

I was referring to testing if the scale factors for the ligament are being computed consistent with a muscle. I thought that would be a simple check to add by comparing the ligament to a muscle with the identical path.

@aymanhab
Copy link
Member Author

@aseth1 Indeed we can add muscles in parallel with ligaments to test the path scaling as a test for self-consistency but considering that both Ligaments and Muscles delegate their path scaling to GeometryPath.scale() this may not strengthen the test case much as it stands. Please let me know your preference. Thanks.

@aseth1
Copy link
Member

aseth1 commented Jul 27, 2015

To follow this would require the scale call to be passed on to the Geometry itself and let the latter decide how to scale itself. Please let me know if you agree and I'll open a separate issue, and remove the comment. It'd be good to document this desired behavior for future component writers. Thanks.

I agree we should have an issue to discuss scaling going forward. One idea is that Frame contains scale factors (like it is now, which are determined by a ModelScaler) and then it is up to Components that depend on (connect to) Frames to use these values to perform their own scaling. It needs work.

@aymanhab
Copy link
Member Author

@aseth1 Changes have been made and issue #557 opened as a place holder for scaling discussion. Please let me know if ready to merge. Thanks.

@aymanhab
Copy link
Member Author

Can we merge this, @aseth1 ? Thanks

@aseth1
Copy link
Member

aseth1 commented Jul 30, 2015

I am reluctantly merging this as a necessary band-aid to address Ligaments alone. There remains a glaring issue that other Components (esp. forces connected to bodies) will not be scaled, which is beyond the intent of this PR.

aseth1 added a commit that referenced this pull request Jul 30, 2015
@aseth1 aseth1 merged commit 7deb504 into master Jul 30, 2015
@aymanhab
Copy link
Member Author

Thanks @aseth1 Please add your comments/issues to issue #557 so the discussion doesn't fall through the cracks. Maybe @jimmyDunne can pick it up when working on fixer.

@aymanhab aymanhab deleted the backport_scale_OpenSim33 branch July 30, 2015 21:41
@jimmyDunne
Copy link
Member

🎱

aseth1 added a commit that referenced this pull request Aug 28, 2015
…rdinates are accessible during Model building. It does not resolve the problem that coordinates of the joint are not accessible upon construction of the Joint (see #538). Temporary fix is to make a call to finalizeFromProperties.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants