Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/817 mechanism for zeroing effector control alg msg outputs #943

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Natsoulas
Copy link
Contributor

@Natsoulas Natsoulas commented Feb 27, 2025

Description

This PR addresses the issue of FSW algorithm modules failing to zero their output messages when disabled, which could lead to runaway operations. The approach taken was to review effector interface modules and implement consistent zeroing functionality in their reset methods.

The following modules were modified to zero their output messages in their Reset methods:

  • rwMotorVoltage
  • torque2Dipole
  • dipoleMapping
  • forceTorqueThrForceMapping
  • torqueScheduler
  • thrusterPlatformReference
  • thrusterPlatformState

Each implementation follows the same pattern:

  1. Create a zeroed message payload using the appropriate _zeroMsgPayload() function
  2. Write this zeroed message to the output message structure

Some modules like thrustRWDesat were found to already have the necessary zeroing functionality in place.

Verification

The changes were validated by:

  1. Reviewing each module's code structure to ensure the zeroing functionality was implemented correctly
  2. Ensuring consistency in the implementation approach across all modules
  3. Verifying that the zeroing occurs in the Reset method, which is called when modules are disabled
  4. Ensuring all existing unit tests still pass

No new tests were added as this is a safety enhancement to existing functionality. The existing module tests will continue to validate the behavior of these modules.

Documentation

The release notes have been updated to include an entry about this enhancement.
The .rst documentation for all relevant effectors have been updated to mention the zeroing behavior on reset.
No other documentation was invalidated by these changes as they merely enhance existing functionality.

Future work

No immediate future work is anticipated. However, as new effector interface modules are added to the codebase, they should follow this pattern of zeroing output messages in their reset methods to maintain consistent safety behavior.

@Natsoulas Natsoulas requested a review from schaubh February 27, 2025 03:38
@Natsoulas Natsoulas self-assigned this Feb 27, 2025
@Natsoulas Natsoulas requested a review from a team as a code owner February 27, 2025 03:38
@Natsoulas Natsoulas added the enhancement New feature or request label Feb 27, 2025
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.

Getting close, need to address a few small items. Shouldn't take long.

@Natsoulas Natsoulas force-pushed the feature/817-mechanism-for-zeroing-effector-control-alg-msg-outputs branch from 1ab549d to a04641f Compare February 28, 2025 01:59
@Natsoulas Natsoulas requested a review from schaubh February 28, 2025 02:03
@Natsoulas Natsoulas force-pushed the feature/817-mechanism-for-zeroing-effector-control-alg-msg-outputs branch from a04641f to dbd386b Compare February 28, 2025 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

No easy mechanism for zeroing effector control algorithm message outputs
2 participants