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

[Docs] Add Feedforward to ElevatorProfiledPid #5300

Merged
merged 6 commits into from Jul 24, 2023

Conversation

jruaaa
Copy link
Contributor

@jruaaa jruaaa commented Apr 30, 2023

Fixes #5014 for Java example

@jruaaa jruaaa requested review from a team as code owners April 30, 2023 02:57
@jruaaa jruaaa changed the title Add Feedforward to ElevatorProfiledPid [Docs] Add Feedforward to ElevatorProfiledPid Apr 30, 2023
@@ -40,6 +43,6 @@ public void teleopPeriodic() {
}

// Run controller and update motor output
m_motor.set(m_controller.calculate(m_encoder.getDistance()));
m_motor.setVoltage(m_controller.calculate(m_encoder.getDistance()) + m_feedforward.calculate(m_controller.getSetpoint().velocity));
Copy link
Member

Choose a reason for hiding this comment

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

If output units are changed from duty cycle to volts, other values and docs need to be unit corrected.

Copy link
Member

Choose a reason for hiding this comment

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

What docs?

@prateekma
Copy link
Member

Do you need assistance with the C++ example?

@PeterJohnson PeterJohnson merged commit 1938251 into wpilibsuite:main Jul 24, 2023
20 of 21 checks passed
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.

Add Feedforward to elevatorprofiledpid example
7 participants