Fix ParameterTransform Python constructor missing activeJointParams#1228
Open
nickyhe-gemini wants to merge 1 commit intomainfrom
Open
Fix ParameterTransform Python constructor missing activeJointParams#1228nickyhe-gemini wants to merge 1 commit intomainfrom
nickyhe-gemini wants to merge 1 commit intomainfrom
Conversation
Summary: The ParameterTransform pybind11 constructor (both sparse and dense variants) did not initialize `activeJointParams`. This field was left as an empty VectorX<bool> (size 0), causing an Eigen assertion failure (`index >= 0 && index < size()`) whenever the character was used with any solver error function that indexes `activeJointParams_`. The fix adds `computeActiveJointParams()` after setting the transform, matching the pattern used by D98022741 (removeJoints fix) and the C++ `ParameterTransform::identity()` factory. This was discovered while building rigid body characters programmatically from Python for marker tracking — any character constructed via `ParameterTransform(names, skeleton, transform)` would crash in `process_markers`, `calibrate_markers`, or any solver path. Differential Revision: D98361877
Contributor
|
@nickyhe-gemini has exported this pull request. If you are a Meta employee, you can view the originating Diff in D98361877. |
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.
Summary:
The ParameterTransform pybind11 constructor (both sparse and dense
variants) did not initialize
activeJointParams. This field was left asan empty VectorX (size 0), causing an Eigen assertion failure
(
index >= 0 && index < size()) whenever the character was used with anysolver error function that indexes
activeJointParams_.The fix adds
computeActiveJointParams()after setting the transform,matching the pattern used by D98022741 (removeJoints fix) and the C++
ParameterTransform::identity()factory.This was discovered while building rigid body characters programmatically
from Python for marker tracking — any character constructed via
ParameterTransform(names, skeleton, transform)would crash inprocess_markers,calibrate_markers, or any solver path.Differential Revision: D98361877