Skip to content

Conversation

@moorepants
Copy link
Member

The mass and inertia selection/computations were done in the wrong loop, so
the same inertial properties were used for each segment. This remedies that by
moving the computations into the force/moment loop.

The mass and inertia selection/computations were done in the wrong loop, so
the same inertial properties were used for each segment. This rememdies that by
moving the computations into the force/moment loop.
@moorepants
Copy link
Member Author

@tvdbogert @spinningplates

Can you confirm that this is correct?

@tvdbogert
Copy link
Member

Good catch! From the diff it seems that m and k were set in the kinematics loop, so the subsequent inverse dynamics loop used the values from the last segment (thigh or trunk, not sure).

It's not a huge difference in results, but it certainly will help make the ankle and knee moments less noisy because the inertial terms will become smaller there.

BTW I was able to see the diff, but what is an easy way to view the complete previous version of the file?

@moorepants
Copy link
Member Author

If you click the "files changed" tab at the top here and you will see the diff, but there are two buttons "edit" and "view" at the top of the code. The "view" button shows the full file at that commit.

@moorepants
Copy link
Member Author

There reason more lines changed than just the offending ones if because I corrected the indentation.

@moorepants
Copy link
Member Author

Oh, if you want to see the previous version of the file, then just go the main repo page (https://github.com/csu-hmc/Gait-Analysis-Toolkit) and navigate to the file. I'm "pulling" my changes with respect to the master branch, which is what you see by default on the main repo page.

@tvdbogert
Copy link
Member

Thanks. The kinematics loop ends at the last segment in the table, which is the foot, so it was actually using the foot mass and radius of gyration for the inverse dynamic calculations in all segments. So your ankle moment was not affected by the bug. And you will now actually get more noise in knee and hip moment because the inertial terms will be larger there.

Github question: view gives me the most recent version, how can I browse older versions?

@moorepants
Copy link
Member Author

On the main page the "commit" link brings you to this:

https://github.com/csu-hmc/Gait-Analysis-Toolkit/commits/master

That lists all of the commits (most recent at the top) in the master branch, i.e. the main branch. You can then click the "browse code" link by each commit to view the version of the repository at that time.

But note that my changes are on the branch called "radius-of-gyration", so on the main page there is a drop down menu that says "branch: master". If you click that you can select any branch. My branch's commits are not yet merged into the master branch. This page is just the request to do so.

This visualization https://github.com/csu-hmc/Gait-Analysis-Toolkit/network shows the network of branches and the commit order.

@moorepants
Copy link
Member Author

Ok, merging this.

moorepants added a commit that referenced this pull request Apr 4, 2014
Mass and inertia are now correctly computed for each segment.
@moorepants moorepants merged commit 29c63da into master Apr 4, 2014
@moorepants moorepants deleted the radius-of-gyration branch April 24, 2014 16:14
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.

3 participants