-
Notifications
You must be signed in to change notification settings - Fork 0
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
Auton #12
base: master
Are you sure you want to change the base?
Auton #12
Conversation
renamed setMotorSpeed to setSpeed created defaultOnSpeed and defaultOffSpeed
Replaced flywheel with original version
Wraps the lift belts and flippers only. Does not include runup belt. No longer extends SubsystemBase Changed some member names for clarity make subsystem data members public
intake now wraps the intake rollers, the funnel motor, and the intake extension solenoid added different default speed constants added various speed setters made subsystem data members public so commands can access them
…4/2020-Code into shooter-commands
…or the spline visualizer
…er implementation
…nd movement commands
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.
Looks mostly good.
class JustMove extends AutonRoutine { | ||
|
||
public JustMove() { | ||
this.andThen(new ChassisMoveDistance(RobotMap.Component.chassis, 10, null)); // TODO: what motioncontroller? |
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.
I may be mistaken, but doesn't andThen require you to already have some commands in the group?
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.
What do you do instead to add the first command?
class JustMove extends AutonRoutine { | ||
|
||
public JustMove() { | ||
this.andThen(new ChassisMoveDistance(RobotMap.Component.chassis, 10, null)); // TODO: what motioncontroller? |
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.
why not just use SimpleSplines
?
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.
No need to if the robot is just moving forwards?
src/main/java/org/usfirst/frc4904/auton/PickupAndShootCenter.java
Outdated
Show resolved
Hide resolved
|
||
class PickupAndShootCenter extends AutonRoutine { | ||
|
||
public PickupAndShootCenter() { |
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.
maybe clarify that this is PickupAndShootCenter
, where we don't reevaluate our position.
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.
you mean that it doesn't use localization?
|
||
import edu.wpi.first.wpilibj.trajectory.Trajectory; | ||
|
||
class PickupAndShootSide extends AutonRoutine { |
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.
similar comments to PickupAndShootCenter
...
import edu.wpi.first.wpilibj.geometry.Pose2d; | ||
import edu.wpi.first.wpilibj.geometry.Rotation2d; | ||
|
||
class Poses { |
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.
I'm not gonna bother with checking all of these constants right now, but just remember that - is right and clockwise, + is left and ccw.
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.
yeah most of these are probably wrong, especially the rotations
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.
AutonRoutine
probably isn't necessary and use addCommands
more instead of andThen
this.andThen(collectSpline); | ||
andThen(new VisionMoveHighPort()); | ||
double FlywheelSpeed = 0.0; | ||
andThen(new Shoot(RobotMap.Component.indexer, RobotMap.Component.shooter, FlywheelSpeed)); |
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.
if you move to the high port, use the BoxShot
command instead of Shoot
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.
AutonRoutine
is used as a wrapper for the spline visualizer to access auton commands
Trajectory collect = RobotMap.Component.sensorChassis | ||
.generateQuinticTrajectory(Arrays.asList(Poses.sideCollectStart, Poses.sideCollectEnd)); | ||
SimpleSplines collectSpline = new SimpleSplines(RobotMap.Component.sensorChassis, collect); | ||
this.andThen(collectSpline); |
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.
intake should be called in parallel
|
||
class PickupAndShootSide extends AutonRoutine { | ||
|
||
public PickupAndShootSide() { |
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.
instead of using andThen
, you can use the addCommands
method and pass in all your commands in order
// All measurements are in inches, starting at the bottom left corner of the | ||
// field (I hope) |
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.
meters please
// | ||
|
||
// Useful constants | ||
static final int topOfField = 319; |
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.
constants should be in THIS_CASE
|
||
class ShootAndPickupSide extends AutonRoutine { | ||
|
||
public ShootAndPickupSide() { |
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.
same thing with addCommands
|
||
class ShootandPickupCenter extends AutonRoutine { | ||
|
||
public ShootandPickupCenter() { // TODO: Splining from the shooting pose to the balls will probably just make it |
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 addCommands
All of the constants in Poses.java still need tuning, and we might want more routines later.