Use DifferentialDriveWheelSpeeds in RamseteCommand ctor (#2091)

This commit is contained in:
Prateek Machiraju
2019-11-19 01:11:05 -05:00
committed by Peter Johnson
parent b37b68daaf
commit 5891628112
8 changed files with 61 additions and 70 deletions

View File

@@ -60,10 +60,8 @@ class RamseteCommand : public CommandHelper<CommandBase, RamseteCommand> {
* trajectory.
* @param feedforward A component for calculating the feedforward for the drive.
* @param kinematics The kinematics for the robot drivetrain.
* @param leftSpeed A function that supplies the speed of the left side
* of the robot drive.
* @param rightSpeed A function that supplies the speed of the right side
* of the robot drive.
* @param wheelSpeeds A function that supplies the speeds of the left
* and right sides of the robot drive.
* @param leftController The PIDController for the left side of the robot
* drive.
* @param rightController The PIDController for the right side of the robot
@@ -76,8 +74,7 @@ class RamseteCommand : public CommandHelper<CommandBase, RamseteCommand> {
frc::RamseteController controller,
frc::SimpleMotorFeedforward<units::meters> feedforward,
frc::DifferentialDriveKinematics kinematics,
std::function<units::meters_per_second_t()> leftSpeed,
std::function<units::meters_per_second_t()> rightSpeed,
std::function<frc::DifferentialDriveWheelSpeeds()> wheelSpeeds,
frc2::PIDController leftController,
frc2::PIDController rightController,
std::function<void(units::volt_t, units::volt_t)> output,
@@ -121,8 +118,7 @@ class RamseteCommand : public CommandHelper<CommandBase, RamseteCommand> {
frc::RamseteController m_controller;
frc::SimpleMotorFeedforward<units::meters> m_feedforward;
frc::DifferentialDriveKinematics m_kinematics;
std::function<units::meters_per_second_t()> m_leftSpeed;
std::function<units::meters_per_second_t()> m_rightSpeed;
std::function<frc::DifferentialDriveWheelSpeeds()> m_speeds;
std::unique_ptr<frc2::PIDController> m_leftController;
std::unique_ptr<frc2::PIDController> m_rightController;
std::function<void(units::volt_t, units::volt_t)> m_outputVolts;