Skip to content

Add PID and FWBA Control#41

Closed
EemanAleem wants to merge 27 commits intomainfrom
feature/am/PID
Closed

Add PID and FWBA Control#41
EemanAleem wants to merge 27 commits intomainfrom
feature/am/PID

Conversation

@EemanAleem
Copy link
Contributor

@EemanAleem EemanAleem commented Jul 10, 2025

Added AM_pid header and source and pid_mapping header and source files. Left actual values like integral limits, output limits and PID constants as placeholder values for now.

@EemanAleem EemanAleem requested a review from avancruy July 10, 2025 22:05
@avancruy avancruy changed the title Feature/am/pid Add PID and FWBA Control Jul 10, 2025
outputToMotor(THROTTLE, motorOutputs.throttle);
outputToMotor(FLAP_ANGLE, motorOutputs.flapAngle);
outputToMotor(STEERING, motorOutputs.yaw);
signedYaw = motorOutputs.roll-50;
Copy link
Contributor

Choose a reason for hiding this comment

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

seems to be only used here, maybe better as local variable?

Copy link
Contributor Author

@EemanAleem EemanAleem Jul 10, 2025

Choose a reason for hiding this comment

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

Issue with constructor (?) tryna fix.
- Fixed lint check's case style errors
- Made rollPID & pitchPID into ptrs and added ptr stuff wherever they're used.
- Removed redundant vars for roll & pitch i.e. PID consts and tau. Note: tau is updated in an alg. whenever KD is.
- Fixed constructor for roll and pitch PID.
- Linked setters for roll & pitch to setter in pid class.
- Added destructors.
Copy link
Contributor

@SuperMK15 SuperMK15 left a comment

Choose a reason for hiding this comment

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

Great work! Left some minor comments.

EemanAleem and others added 3 commits September 20, 2025 00:58
- Integral calculation in pid.cpp was missing multiplication with time. Corrected now.
- Removed dynamic alloc
- Changed file names to correct misspelling (lol)
- Changed class names for clarity
- Moved function bodies to .cpp files
- Roll integral, pitch integral, and output limits changed to const static var
- Added noexcept keyword to some functions that don't throw exceptions for optimization.
@avancruy avancruy closed this Dec 13, 2025
@avancruy avancruy deleted the feature/am/PID branch January 19, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants