Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Commit

Permalink
mesaj
Browse files Browse the repository at this point in the history
  • Loading branch information
MorphaxTheDeveloper committed Mar 16, 2024
1 parent f48ce7d commit af3e623
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 120 deletions.
132 changes: 17 additions & 115 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,6 @@ public Command getAutonomousCommand() {
.setKinematics(DriveConstants.kDriveKinematics);

// Pathler

// var trajectoryOne =
// TrajectoryGenerator.generateTrajectory(
// new Pose2d(-1, -1, new Rotation2d(0)),
// List.of(new Translation2d(0, -1)),
// new Pose2d(0.0, -1, new Rotation2d(0)),
// trajectoryConfig);

var trajectoryOne =
TrajectoryGenerator.generateTrajectory(
Expand All @@ -396,36 +389,6 @@ public Command getAutonomousCommand() {
new Translation2d(0.0, 0.0)),
new Pose2d(-0.1,0, new Rotation2d(0)),
trajectoryConfig);

var trajectoryF =
TrajectoryGenerator.generateTrajectory(
new Pose2d(0, 0, new Rotation2d(0)),
List.of(new Translation2d(-0.60, 0),new Translation2d(-1, 0)),
new Pose2d(-1.28, 0, new Rotation2d(0)),
trajectoryConfig);

var trajectoryP =
TrajectoryGenerator.generateTrajectory(
new Pose2d(-1.28, 0, new Rotation2d(0)),
List.of(new Translation2d(-0.70, 0),new Translation2d(-0.35, 0)),
new Pose2d(-0,0, new Rotation2d(0)),
trajectoryConfig);


// var trajectoryThree =
// TrajectoryGenerator.generateTrajectory(
// new Pose2d(0, 0, new Rotation2d(0)),
// List.of(new Translation2d(-0.5, -1),new Translation2d(-1.48, -1),new Translation2d(0, -1)
// ,new Translation2d(0, -0.5)),
// new Pose2d(0,-0.1, new Rotation2d(0)),
// trajectoryConfig);

var topusikim =
TrajectoryGenerator.generateTrajectory(
List.of(new Pose2d(0, 0, new Rotation2d(0)),
new Pose2d(-0.5, -1, new Rotation2d(0)),
new Pose2d(-1.58, -1.2, new Rotation2d(Math.PI/6))),
trajectoryConfig);

var note3path =
TrajectoryGenerator.generateTrajectory(
Expand Down Expand Up @@ -457,61 +420,6 @@ public Command getAutonomousCommand() {
List.of(new Translation2d(-1.3, 0),new Translation2d(0,0)),
new Pose2d(0,0, new Rotation2d(0)),
trajectoryConfig);


// var trajectoryOne =
// TrajectoryGenerator.generateTrajectory(
// List.of(
// new Pose2d(0, 0, new Rotation2d(0)),
// new Pose2d(-1.4, -1.8, new Rotation2d(1.2)),
// new Pose2d(0, -1, new Rotation2d(-2)),
// new Pose2d(-1, -1, new Rotation2d(0))),
// trajectoryConfig);

// SwerveControllerCommand swerveControllerCommand = new SwerveControllerCommand(
// trajectoryOne,
// swerveSubsystem::getPose,
// DriveConstants.kDriveKinematics,
// xController,
// yController,
// thetaController,
// swerveSubsystem::OtosetModuleStates,
// swerveSubsystem);

// SwerveControllerCommand swerveControllerCommand2 = new SwerveControllerCommand(
// trajectoryTwo,
// swerveSubsystem::getPose,
// DriveConstants.kDriveKinematics,
// xController,
// yController,
// thetaController,
// swerveSubsystem::OtosetModuleStates,
// swerveSubsystem);

// SwerveControllerCommand swerveControllerCommand3 = new SwerveControllerCommand(
// trajectoryThree,
// swerveSubsystem::getPose,
// DriveConstants.kDriveKinematics,
// xController,
// yController,
// thetaController,
// swerveSubsystem::OtosetModuleStates,
// swerveSubsystem);

// switch(autonomous_case) {

// case 0: // Önce içindekini atacak sonrasında arkasındakini atıp atabiliyorsa onu oradan atacak sonra en arkadaki
// return new AutoNoteShoot(m_shooter, m_feeder, () -> 70);
// //Command(goSecondNote).andThen(pathCommand(secondNoteToSpeaker));

// case 1:

// case 2:

// default: return new AutoNoteShoot(m_shooter, m_feeder, () -> 70);
// //pathCommand(goSecondNote).andThen(pathCommand(secondNoteToSpeaker));
// }
// return null;

// return new AutoNoteShoot(m_shooter, m_feeder, () -> 55).withTimeout(2)
// .andThen(pathCommand(trajectoryOne).alongWith(new pickupforAuto(m_intake, m_joystick).withTimeout(3.8))
Expand Down Expand Up @@ -572,22 +480,19 @@ public Command getAutonomousCommand() {
// .andThen(new InstantCommand(()-> m_shooter.throwStop()))
// .andThen(new InstantCommand(()-> m_intake.StopNoteMotor()));

return new AutoNoteShoot(m_shooter, m_feeder, () -> 64).withTimeout(2)
.andThen(pathCommand(trajectoryOne).alongWith(new pickupforAuto(m_intake, m_joystick).withTimeout(3.75))
.withTimeout(4.75)
.andThen(new InstantCommand(()-> m_intake.StopNoteMotor())
.andThen(new InstantCommand(()-> swerveSubsystem.stopModules()))))
.andThen(new otofeedleme(m_intake, m_feeder, m_joystick, m_shooter)).withTimeout(6.75)
.andThen(new InstantCommand(()-> m_intake.StopNoteMotor()))
.andThen(new AutoNoteShoot(m_shooter, m_feeder, ()-> 70)).withTimeout(8)
// İKİ NOTA


// return new AutoNoteShoot(m_shooter, m_feeder, () -> 60).andThen(new SwerveJoystickCmd(swerveSubsystem, () -> -0.8,
// () -> 0.0, () -> 0.0, () -> !driverJoytick.getRawButton(OIConstants.kDriverFieldOrientedButtonIdx)).withTimeout(3))
// .alongWith(new pickupforAuto(m_intake, m_joystick)).withTimeout(3)
// .andThen(new AutoNoteShoot(m_shooter, m_feeder, ()-> 40));
// return new AutoNoteShoot(m_shooter, m_feeder, () -> 64).withTimeout(2)
// .andThen(pathCommand(trajectoryOne).alongWith(new pickupforAuto(m_intake, m_joystick).withTimeout(3.75))
// .withTimeout(4.75)
// .andThen(new InstantCommand(()-> m_intake.StopNoteMotor())
// .andThen(new InstantCommand(()-> swerveSubsystem.stopModules()))))
// .andThen(new otofeedleme(m_intake, m_feeder, m_joystick, m_shooter)).withTimeout(6.75)
// .andThen(new InstantCommand(()-> m_intake.StopNoteMotor()))
// .andThen(new AutoNoteShoot(m_shooter, m_feeder, ()-> 70)).withTimeout(8);

// İKİ NOTA ESKİ

//İKİ NOTA
// return new AutoNoteShoot(m_shooter, m_feeder, () -> 60).withTimeout(2)
// .andThen(pathCommand(trajectoryOne).alongWith(new pickupforAuto(m_intake, m_joystick).withTimeout(4))
// .withTimeout(5)
Expand All @@ -596,17 +501,14 @@ public Command getAutonomousCommand() {
// .andThen(new InstantCommand(()-> m_joystick.intakemodchange(0)))
// .andThen(new fedleme(m_intake, m_feeder, m_joystick, m_shooter)).withTimeout(8.5)
// .andThen(new AutoNoteShoot(m_shooter, m_feeder, ()-> 60));

// .andThen((pathCommand(trajectoryOne).alongWith(new pickupforAuto(m_intake, m_joystick).withTimeout(3))
// .andThen(new fedleme(m_intake, m_feeder, m_joystick, m_shooter)).withTimeout(1)));
// .andThen(new AutoNoteShoot(m_shooter, m_feeder, () -> 60));

//return pathCommand(trajectoryF).andThen(pathCommand(trajectoryP));
// BİR NOTA

// return new AutoNoteShoot(m_shooter, m_feeder, () -> 55).withTimeout(3);

// sıfır nota (kullanmanız tavsiye olunmaz)

// return swerveControllerCommand.andThen(swerveControllerCommand2).andThen(swerveControllerCommand3);
// PathPlannerPath path = PathPlannerPath.fromPathFile("New New Path");
// Create a path following command using AutoBuilder. This will also trigger event markers.
// return swerveSubsystem.autobuilder.followPath(path);
return null;

}

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/frc/robot/subsystems/SwerveSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ public void periodic() {
backRight.getPosition()
});

SmartDashboard.putNumber("Robot Heading", getHeading());
SmartDashboard.putString("Robot Anglue Value", getRotation2d().toString());
SmartDashboard.putString("Robot Location",
getPose().getTranslation().toString());
SmartDashboard.putNumber("Robot Heading", getHeading());
SmartDashboard.putString("Robot Anglue Value", getRotation2d().toString());
SmartDashboard.putString("Robot Location",
getPose().getTranslation().toString());

SmartDashboard.putNumber("gyro", getHeading());

SmartDashboard.putString("ÇINAR VE TALHAYA MESAJ", "YAPACAKSANIZ LAN YAPACAKSANIZ BAŞKA ŞANSINIZ YOK TAMAM MI LAN BAŞKA ŞANSINIZ YOK GİDİN ORTALIĞI FETH EDİN - İRFAN + RCP");
}
}

0 comments on commit af3e623

Please sign in to comment.