Skip to content

Conversation

@leahkiner
Copy link
Contributor

Description

This PR addresses 5 issues related to adding the capability to connect other state effectors to the prescribed motion module rather than the spacecraft hub.

  • The first commit modifies the stateEffector class for attachment of state effectors to the prescribed motion effector.
  • The second commit is independent of the purpose of this PR, it removes unneeded variables from the prescribedMotion module.
  • The third commit makes the required changes to the prescribedMotion module to enable the new branching capability.
  • The fourth commit is also independent of the purpose of this PR, it adds setters and getters to the prescribedMotion module.
  • Commits 5-7 configure the spinningBodyOneDOF, spinningBodyTwoDOF, and linearTranslationOneDOF state effectors for optional attachment to the prescribed motion effector.
  • Commit 8 adds a new test script called test_PrescribedMotionStateEffectorBranching to the prescribed motion module. Each of these three state effectors are separately attached to the prescribed motion effector and independently verified.
  • Commit 9 adds two branching scenarios to the examples folder. The first is a rotational branching scenario called scenarioPrescribedMotionWithRotationBranching. The second is a translational branching scenario and is called scenarioPrescribedMotionWithTranslationBranching.
  • Commit 10 condenses the branching scenarios using python lists.
  • Commit 11 refactors and cleans up the original prescribed motion test script.
  • Commit 12 updates the prescribed motion module documentation to reflect these changes.
  • Commit 13 updates bskReleaseNotes.

Verification

A new test script test_PrescribedMotionStateEffectorBranching is added to the prescribedMotion module that checks the changes made in this PR.

Documentation

The prescribed motion module documentation is updated to discuss these new features.

Future work

Other state effectors will be configured for attachment to the prescribed motion effector in the future.

@leahkiner leahkiner self-assigned this Oct 7, 2025
@leahkiner leahkiner requested a review from a team as a code owner October 7, 2025 21:56
@leahkiner leahkiner added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 7, 2025
@leahkiner leahkiner moved this to 👀 In review in Basilisk Oct 7, 2025
@leahkiner leahkiner force-pushed the feature/932-configure-prescribed-motion-for-effector-branching branch from 1301065 to 0d84979 Compare October 9, 2025 22:37
@leahkiner leahkiner force-pushed the feature/932-configure-prescribed-motion-for-effector-branching branch 11 times, most recently from f0b70b8 to 77aa7a1 Compare October 28, 2025 18:21
@schaubh schaubh changed the title Feature/932 configure prescribed motion for effector branching Configure prescribed motion effector for select effector branching Oct 28, 2025
@leahkiner leahkiner force-pushed the feature/932-configure-prescribed-motion-for-effector-branching branch 2 times, most recently from 20788df to 983aa58 Compare October 29, 2025 16:45
Copy link
Contributor

@andrewmorell andrewmorell left a comment

Choose a reason for hiding this comment

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

Nice PR! A lot of added functionality and the scenarios demonstrating it are really cool. I like the sequence of calling updateContributions() then addPrescribedMotionContributions() to augment the backsub matrices. I also like how you dual use the same backsub matrices for the dependent state effectors and then the prescribed motion module.

I have two broad recommendations besides the specific code callouts below.

  1. Consider being more explicit with inline documentation where new variables are defined in .cpp files since they don't get the nice definitions that variables defined in the .h file do. Your linked papers are great for explaining what math goes on under the hood, but doesn't help someone perusing the code figure out how this math interacts with all of the existing Basilisk architecture choices and frame ambiguity.
  2. I feel like these new features could benefit from a guardrail or two that stops you from trying to setup configurations not yet allowed. When I try adding a non-compatible state effector to prescribed motion, I get an indirect error from the dynParamManager during sim initialization. A default error in the stateEffector base class' linkInPrescribedMotionProperties() method that says this combination isn't set up would be cleaner.

Copy link
Contributor

@schaubh schaubh left a comment

Choose a reason for hiding this comment

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

Great PR overall. Thanks @andrewmorell for having gone through this so carefully. I agree with Andrew's comment that we need the same safeguards implemented as he has with his effector branching. This way if an effector is added that doesn't support your feature, then a BSK Error is thrown with a user-readable message as to why this is not working. Should be simple to mimic what Andrew did on his branch.

@leahkiner leahkiner force-pushed the feature/932-configure-prescribed-motion-for-effector-branching branch 2 times, most recently from 5a56ff4 to f40daf3 Compare November 10, 2025 20:21
@leahkiner leahkiner force-pushed the feature/932-configure-prescribed-motion-for-effector-branching branch from f40daf3 to 8c2c93a Compare November 10, 2025 21:28
@leahkiner
Copy link
Contributor Author

@schaubh I believe this PR is ready to go, I addressed @andrewmorell and your comments.

Copy link
Contributor

@andrewmorell andrewmorell left a comment

Choose a reason for hiding this comment

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

Changes look good on my side!

Copy link
Contributor

@schaubh schaubh left a comment

Choose a reason for hiding this comment

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

Good to go. Thanks for addressing the feedback and adding the guards against adding an effector which is not compatible.

@leahkiner leahkiner merged commit ab81aaf into develop Nov 11, 2025
12 checks passed
@leahkiner leahkiner deleted the feature/932-configure-prescribed-motion-for-effector-branching branch November 11, 2025 04:08
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Basilisk Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: Done

4 participants