-
Notifications
You must be signed in to change notification settings - Fork 3
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
Simple splines #268
base: 2020-update
Are you sure you want to change the base?
Simple splines #268
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly syntax changes
commands/chassis/SimpleSplines.java
Outdated
/** | ||
* Class to store autonomous constants used for Ramsete Pathing. | ||
*/ | ||
public static class AutoConstants { | ||
public static class SplineAutoConstants { | ||
public double kMaxSpeedMetersPerSecond; | ||
public double kMaxAccelerationMetersPerSecondSquared; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the proper constant syntax
commands/chassis/SimpleSplines.java
Outdated
import edu.wpi.first.wpilibj2.command.RamseteCommand; | ||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; | ||
|
||
/** | ||
* This command creates a simple spline to follow a Trajectory using a SensorDrive. Note that while the nextCommand to run after the robot finishes driving and the initialPos are both configuraable, they will almost always be set automatically. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configurable doesn't have two As
this.subsystem = subsystem; | ||
} | ||
|
||
public void initialize() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
override
|
||
import org.usfirst.frc4904.standard.LogKitten; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import edu.wpi.first.wpilibj2.command.CommandBase; | ||
import edu.wpi.first.wpilibj2.command.Subsystem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
@@ -6,6 +6,7 @@ | |||
import org.usfirst.frc4904.standard.humaninput.Operator; | |||
import edu.wpi.first.wpilibj.TimedRobot; | |||
import edu.wpi.first.wpilibj2.command.CommandBase; | |||
import edu.wpi.first.wpilibj2.command.InstantCommand; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
import edu.wpi.first.wpilibj.kinematics.DifferentialDriveOdometry; | ||
import edu.wpi.first.wpilibj.kinematics.DifferentialDriveWheelSpeeds; | ||
import edu.wpi.first.wpilibj.spline.Spline; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
import edu.wpi.first.wpilibj.kinematics.DifferentialDriveOdometry; | ||
import edu.wpi.first.wpilibj.kinematics.DifferentialDriveWheelSpeeds; | ||
import edu.wpi.first.wpilibj.spline.Spline; | ||
import edu.wpi.first.wpilibj.spline.SplineHelper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
import edu.wpi.first.wpilibj.trajectory.TrajectoryConfig; | ||
import edu.wpi.first.wpilibj.trajectory.TrajectoryGenerator; | ||
import edu.wpi.first.wpilibj.trajectory.TrajectoryGenerator.ControlVectorList; | ||
import edu.wpi.first.wpilibj.trajectory.constraint.DifferentialDriveVoltageConstraint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
import edu.wpi.first.wpilibj.trajectory.TrajectoryGenerator; | ||
import edu.wpi.first.wpilibj.trajectory.TrajectoryGenerator.ControlVectorList; | ||
import edu.wpi.first.wpilibj.trajectory.constraint.DifferentialDriveVoltageConstraint; | ||
import edu.wpi.first.wpilibj2.command.Command; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u n u s e d
Adds spline capability with both cubic and quintic pathing. Although some functionality already exists in standard, the previous version contained rather large errors that made it either dysfunctional or impractical.