Fix two bugs in 1DOF Hinged Body Code and the Integrated Test#1357
Merged
Conversation
f572b60 to
e5df00f
Compare
andrewmorell
requested changes
Apr 21, 2026
Contributor
andrewmorell
left a comment
There was a problem hiding this comment.
I think just one small change needed, a variable when calculating v_SN_N was changed that should remain the same.
Contributor
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
e5df00f to
611c62c
Compare
611c62c to
97afe04
Compare
97afe04 to
14a38c4
Compare
andrewmorell
approved these changes
Apr 22, 2026
Contributor
andrewmorell
left a comment
There was a problem hiding this comment.
All looks good now!
schaubh
approved these changes
Apr 22, 2026
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.
Description
This fixes a bug with effector branching in the hingedRigidBodies (HRB) effector. In the effector branching integrated test, the HRB cases used a special conditional applied to retrieving the r_ScN_N_log. That conditional turned out to be unnecessary due to a misunderstanding in what points are referred to as H, S, and Sc. In spinning bodies modules, the center of mass location is referred to Sc and an S frame fixed point S is coincident with an H frame fixed point H. In the HRB modules, point S is instead the center of mass location, but was being assumed coincident with point H. The underlying issue was that the module was tracking the panel center of mass (COM) quantities, r_SN_N and v_SN_N, when it meant to track the hinge point quantities, r_HN_N and v_HN_N. With the hinge point states now handled correctly, the extra conditional in the integrated test is no longer needed, and the test behavior matches the intended 1DOF HRB dynamics for the right reason.
Verification
The test previously passed due to two bugs offsetting each other making the dynamics appear correct even though the implementation was not. The effector was tracking HRB COM instead of hinge location, and the integrated test subtracted off the vector between hinge and COM. The integrated test: test_effectorBranching_integrated.py now still passes, but without subtracting off this intermediate vector since the effector branching now accurately tracks the hinge point itself. Pytest was also run confirming all 36 branching test cases pass. Additional uncommitted validation was performed using Vizard and a 1DOF HRB scenario.
Documentation
No documentation was invalidated by these changes. Some comments are added when defining new variables in the HingedRigidBodyStateEffector header file.
Future work
This change is inherently rolled into the incoming HRB 2DOF and NDOF module changes for branching.