Final changes that make field oriented work post auto
This commit is contained in:
parent
e0fd9dab1d
commit
c02b8b0a3c
@ -8,8 +8,8 @@
|
||||
},
|
||||
"prevControl": null,
|
||||
"nextControl": {
|
||||
"x": 2.4304615881959033,
|
||||
"y": 3.1531161244140673
|
||||
"x": 2.4368920788482864,
|
||||
"y": 3.1622483921028106
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
@ -20,8 +20,8 @@
|
||||
"y": 7.565612949407717
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 1.7961068649410026,
|
||||
"y": 6.511464659292955
|
||||
"x": 1.8176568333482528,
|
||||
"y": 6.336387277909188
|
||||
},
|
||||
"nextControl": null,
|
||||
"isLocked": false,
|
||||
|
@ -5,8 +5,13 @@
|
||||
package frc.robot;
|
||||
|
||||
import com.pathplanner.lib.auto.AutoBuilder;
|
||||
import com.pathplanner.lib.commands.PathPlannerAuto;
|
||||
import com.pathplanner.lib.path.PathPlannerPath;
|
||||
import com.pathplanner.lib.path.PathPlannerTrajectory;
|
||||
import com.pathplanner.lib.util.PathPlannerLogging;
|
||||
|
||||
import edu.wpi.first.math.geometry.Pose2d;
|
||||
import edu.wpi.first.wpilibj.shuffleboard.BuiltInWidgets;
|
||||
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
|
||||
@ -78,9 +83,19 @@ public class RobotContainer {
|
||||
tab.add("Drivetrain Pose", poseSendable)
|
||||
.withPosition(0, 0)
|
||||
.withSize(2, 3);
|
||||
|
||||
tab.add("Auto Selector", autoChooser)
|
||||
.withPosition(2, 0)
|
||||
.withSize(2, 1);
|
||||
|
||||
tab.addDouble("Current Pose Rotation", () -> { return drivetrain.getPose().getRotation().getDegrees(); })
|
||||
.withPosition(2, 1)
|
||||
.withSize(2, 1)
|
||||
.withWidget(BuiltInWidgets.kTextView);
|
||||
}
|
||||
|
||||
public Command getAutonomousCommand() {
|
||||
return autoChooser.getSelected();
|
||||
return drivetrain.zeroHeadingCommand().andThen(autoChooser.getSelected());
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user