Merge branch 'main' of https://git.demerso.net/pls5618/2024/robot
This commit is contained in:
		
							
								
								
									
										16
									
								
								.pathplanner/settings.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								.pathplanner/settings.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | |||||||
|  | { | ||||||
|  |   "robotWidth": 0.9, | ||||||
|  |   "robotLength": 0.9, | ||||||
|  |   "holonomicMode": true, | ||||||
|  |   "pathFolders": [ | ||||||
|  |     "1" | ||||||
|  |   ], | ||||||
|  |   "autoFolders": [ | ||||||
|  |     "1" | ||||||
|  |   ], | ||||||
|  |   "defaultMaxVel": 3.0, | ||||||
|  |   "defaultMaxAccel": 3.0, | ||||||
|  |   "defaultMaxAngVel": 540.0, | ||||||
|  |   "defaultMaxAngAccel": 720.0, | ||||||
|  |   "maxModuleSpeed": 4.5 | ||||||
|  | } | ||||||
| @@ -26,6 +26,6 @@ | |||||||
|       ] |       ] | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   "folder": null, |   "folder": "1", | ||||||
|   "choreoAuto": false |   "choreoAuto": false | ||||||
| } | } | ||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -43,7 +43,7 @@ | |||||||
|     "rotateFast": false |     "rotateFast": false | ||||||
|   }, |   }, | ||||||
|   "reversed": false, |   "reversed": false, | ||||||
|   "folder": null, |   "folder": "1", | ||||||
|   "previewStartingState": null, |   "previewStartingState": null, | ||||||
|   "useDefaultConstraints": false |   "useDefaultConstraints": false | ||||||
| } | } | ||||||
| @@ -43,7 +43,7 @@ | |||||||
|     "rotateFast": false |     "rotateFast": false | ||||||
|   }, |   }, | ||||||
|   "reversed": false, |   "reversed": false, | ||||||
|   "folder": null, |   "folder": "1", | ||||||
|   "previewStartingState": null, |   "previewStartingState": null, | ||||||
|   "useDefaultConstraints": false |   "useDefaultConstraints": false | ||||||
| } | } | ||||||
| @@ -4,12 +4,45 @@ | |||||||
|  |  | ||||||
| package frc.robot; | package frc.robot; | ||||||
|  |  | ||||||
|  | import edu.wpi.first.cameraserver.CameraServer; | ||||||
|  | import edu.wpi.first.math.MathUtil; | ||||||
| import edu.wpi.first.wpilibj2.command.Command; | import edu.wpi.first.wpilibj2.command.Command; | ||||||
| import edu.wpi.first.wpilibj2.command.Commands; | import edu.wpi.first.wpilibj2.command.Commands; | ||||||
|  | import edu.wpi.first.wpilibj2.command.RunCommand; | ||||||
|  |  | ||||||
|  | // Manette | ||||||
|  | import edu.wpi.first.wpilibj2.command.button.CommandJoystick; | ||||||
|  | import edu.wpi.first.wpilibj2.command.button.CommandXboxController; | ||||||
|  |  | ||||||
|  | // Subsystem | ||||||
|  | import frc.robot.subsystem.Accumulateur; | ||||||
|  | import frc.robot.subsystem.Balayeuse; | ||||||
|  | import frc.robot.subsystem.Drive; | ||||||
|  | import frc.robot.subsystem.Grimpeur; | ||||||
|  | import frc.robot.subsystem.Guideur; | ||||||
|  | import frc.robot.subsystem.Lanceur; | ||||||
|  |  | ||||||
|  |  | ||||||
| public class RobotContainer { | public class RobotContainer { | ||||||
|  |    | ||||||
|  |   Drive drive = new Drive(); | ||||||
|  |   Accumulateur accumulateur = new Accumulateur(); | ||||||
|  |   Balayeuse balayeuse = new Balayeuse(); | ||||||
|  |   Grimpeur grimpeur = new Grimpeur(); | ||||||
|  |   Guideur guideur = new Guideur(); | ||||||
|  |   Lanceur lanceur = new Lanceur(); | ||||||
|  |  | ||||||
|  |    CommandJoystick joystick = new CommandJoystick(0); | ||||||
|  |    CommandXboxController manette = new CommandXboxController(1); | ||||||
|  |    | ||||||
|   public RobotContainer() { |   public RobotContainer() { | ||||||
|  |  | ||||||
|  |     CameraServer.startAutomaticCapture(); | ||||||
|  |  | ||||||
|     configureBindings(); |     configureBindings(); | ||||||
|  |      drive.setDefaultCommand(new RunCommand(()->{ | ||||||
|  |      drive.drive(-MathUtil.applyDeadband(joystick.getY(),0.2), MathUtil.applyDeadband(-joystick.getX(),0.2), MathUtil.applyDeadband(-joystick.getZ(), 0.2)); | ||||||
|  |     },drive)); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   private void configureBindings() {} |   private void configureBindings() {} | ||||||
|   | |||||||
| @@ -40,9 +40,6 @@ public void resetencodeurd(){ | |||||||
| public void resetencodeurg(){ | public void resetencodeurg(){ | ||||||
|   grimpeurg.getEncoder().setPosition(0); |   grimpeurg.getEncoder().setPosition(0); | ||||||
| } | } | ||||||
| public void grimpeur(){ |  | ||||||
|   grimpeurg.follow(grimpeurd); |  | ||||||
| } |  | ||||||
| public AHRS gyroscope = new AHRS(); | public AHRS gyroscope = new AHRS(); | ||||||
|   public double getpitch(){ |   public double getpitch(){ | ||||||
|     return gyroscope.getPitch(); |     return gyroscope.getPitch(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user