[WIP] Use topology-based moment arm detection in PolynomialPathFitter#4352
Draft
nickbianco wants to merge 2 commits into
Draft
[WIP] Use topology-based moment arm detection in PolynomialPathFitter#4352nickbianco wants to merge 2 commits into
PolynomialPathFitter#4352nickbianco wants to merge 2 commits into
Conversation
…ctGeometryPath::findIndependentCoordinatePaths()
PolynomialPathFitter
nickbianco
force-pushed
the
path_fitter_refactor_moment_arms
branch
3 times, most recently
from
July 14, 2026 17:21
bcd5aba to
b09bd53
Compare
nickbianco
force-pushed
the
path_fitter_refactor_moment_arms
branch
from
July 14, 2026 17:28
b09bd53 to
2fb32ee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue #4348
Brief summary of changes
Leverages changes added via #4301 to find the set of coordinates in each path for which to compute moment arms. Previously, moment arms for every coordinate in the model were computed for each path which was inefficient and sometimes produced erroneous moment arms due to
MomentArmSolver's force-based calculation approach. Now, we automatically detect which coordinates should belong to a path based on the model topology by finding the joints that lie between the path's origin and insertion. Moment arms are computed only for coordinates detected using this approach.The property
moment_arm_thresholdhas been removed, and the methodsget/setMomentArmThreshold()have been deprecated. In addition, the approach for leverage thread parallelization has been modified: now each thread performs the calculations for a single path at a time, iterating over all paths until completed. This is achieved usingstd::atomicto store a (thread-safe) index of the current path, and the worker function in each thread operates on a while-loop until the set of paths is exhausted.Testing I've completed
Existing CI tests, e.g.,
testPolynomialPathFitter.cpp. Also tested scripting exampleexamplePolynomialPathFitter.pylocally.Looking for feedback on...
CHANGELOG.md (choose one)
This change is