mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
SCRIPT Run java package replacements
This commit is contained in:
committed by
Peter Johnson
parent
12823a003d
commit
f0a3c64121
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.commands.command2;
|
||||
package org.wpilib.commands.command2;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import org.wpilib.command2.Command;
|
||||
|
||||
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
||||
public class ReplaceMeCommand extends Command {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.commands.emptyclass;
|
||||
package org.wpilib.commands.emptyclass;
|
||||
|
||||
/** Add your docs here. */
|
||||
public class ReplaceMeEmptyClass {}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.commands.instantcommand;
|
||||
package org.wpilib.commands.instantcommand;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.InstantCommand;
|
||||
import org.wpilib.command2.InstantCommand;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.commands.parallelcommandgroup;
|
||||
package org.wpilib.commands.parallelcommandgroup;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup;
|
||||
import org.wpilib.command2.ParallelCommandGroup;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.commands.paralleldeadlinegroup;
|
||||
package org.wpilib.commands.paralleldeadlinegroup;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.InstantCommand;
|
||||
import edu.wpi.first.wpilibj2.command.ParallelDeadlineGroup;
|
||||
import org.wpilib.command2.InstantCommand;
|
||||
import org.wpilib.command2.ParallelDeadlineGroup;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.commands.parallelracegroup;
|
||||
package org.wpilib.commands.parallelracegroup;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.ParallelRaceGroup;
|
||||
import org.wpilib.command2.ParallelRaceGroup;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.commands.sequentialcommandgroup;
|
||||
package org.wpilib.commands.sequentialcommandgroup;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import org.wpilib.command2.SequentialCommandGroup;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.commands.subsystem2;
|
||||
package org.wpilib.commands.subsystem2;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
import org.wpilib.command2.SubsystemBase;
|
||||
|
||||
public class ReplaceMeSubsystem extends SubsystemBase {
|
||||
/** Creates a new ReplaceMeSubsystem. */
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.addressableled;
|
||||
package org.wpilib.examples.addressableled;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.addressableled;
|
||||
package org.wpilib.examples.addressableled;
|
||||
|
||||
import static edu.wpi.first.units.Units.Meters;
|
||||
import static edu.wpi.first.units.Units.MetersPerSecond;
|
||||
import static org.wpilib.units.Units.Meters;
|
||||
import static org.wpilib.units.Units.MetersPerSecond;
|
||||
|
||||
import edu.wpi.first.units.measure.Distance;
|
||||
import edu.wpi.first.wpilibj.AddressableLED;
|
||||
import edu.wpi.first.wpilibj.AddressableLEDBuffer;
|
||||
import edu.wpi.first.wpilibj.LEDPattern;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import org.wpilib.units.measure.Distance;
|
||||
import org.wpilib.hardware.led.AddressableLED;
|
||||
import org.wpilib.hardware.led.AddressableLEDBuffer;
|
||||
import org.wpilib.hardware.led.LEDPattern;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
|
||||
public class Robot extends TimedRobot {
|
||||
private final AddressableLED m_led;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.apriltagsvision;
|
||||
package org.wpilib.examples.apriltagsvision;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.apriltagsvision;
|
||||
package org.wpilib.examples.apriltagsvision;
|
||||
|
||||
import edu.wpi.first.apriltag.AprilTagDetection;
|
||||
import edu.wpi.first.apriltag.AprilTagDetector;
|
||||
import edu.wpi.first.apriltag.AprilTagPoseEstimator;
|
||||
import edu.wpi.first.cameraserver.CameraServer;
|
||||
import edu.wpi.first.cscore.CvSink;
|
||||
import edu.wpi.first.cscore.CvSource;
|
||||
import edu.wpi.first.cscore.UsbCamera;
|
||||
import edu.wpi.first.math.geometry.Rotation3d;
|
||||
import edu.wpi.first.math.geometry.Transform3d;
|
||||
import edu.wpi.first.networktables.IntegerArrayPublisher;
|
||||
import edu.wpi.first.networktables.NetworkTable;
|
||||
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import org.wpilib.vision.apriltag.AprilTagDetection;
|
||||
import org.wpilib.vision.apriltag.AprilTagDetector;
|
||||
import org.wpilib.vision.apriltag.AprilTagPoseEstimator;
|
||||
import org.wpilib.vision.stream.CameraServer;
|
||||
import org.wpilib.vision.camera.CvSink;
|
||||
import org.wpilib.vision.camera.CvSource;
|
||||
import org.wpilib.vision.camera.UsbCamera;
|
||||
import org.wpilib.math.geometry.Rotation3d;
|
||||
import org.wpilib.math.geometry.Transform3d;
|
||||
import org.wpilib.networktables.IntegerArrayPublisher;
|
||||
import org.wpilib.networktables.NetworkTable;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import java.util.ArrayList;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.Point;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.arcadedrive;
|
||||
package org.wpilib.examples.arcadedrive;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.arcadedrive;
|
||||
package org.wpilib.examples.arcadedrive;
|
||||
|
||||
import edu.wpi.first.util.sendable.SendableRegistry;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import org.wpilib.util.sendable.SendableRegistry;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.drive.DifferentialDrive;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
|
||||
/**
|
||||
* This is a demo program showing the use of the DifferentialDrive class. Runs the motors with
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.arcadedrivexboxcontroller;
|
||||
package org.wpilib.examples.arcadedrivexboxcontroller;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.arcadedrivexboxcontroller;
|
||||
package org.wpilib.examples.arcadedrivexboxcontroller;
|
||||
|
||||
import edu.wpi.first.util.sendable.SendableRegistry;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.XboxController;
|
||||
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import org.wpilib.util.sendable.SendableRegistry;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.driverstation.XboxController;
|
||||
import org.wpilib.drive.DifferentialDrive;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
|
||||
/**
|
||||
* This is a demo program showing the use of the DifferentialDrive class. Runs the motors with split
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.armsimulation;
|
||||
package org.wpilib.examples.armsimulation;
|
||||
|
||||
import edu.wpi.first.math.util.Units;
|
||||
import org.wpilib.math.util.Units;
|
||||
|
||||
public class Constants {
|
||||
public static final int kMotorPort = 0;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.armsimulation;
|
||||
package org.wpilib.examples.armsimulation;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.armsimulation;
|
||||
package org.wpilib.examples.armsimulation;
|
||||
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.examples.armsimulation.subsystems.Arm;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.examples.armsimulation.subsystems.Arm;
|
||||
|
||||
/** This is a sample program to demonstrate the use of arm simulation with existing code. */
|
||||
public class Robot extends TimedRobot {
|
||||
|
||||
@@ -2,26 +2,26 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.armsimulation.subsystems;
|
||||
package org.wpilib.examples.armsimulation.subsystems;
|
||||
|
||||
import edu.wpi.first.math.controller.PIDController;
|
||||
import edu.wpi.first.math.system.plant.DCMotor;
|
||||
import edu.wpi.first.math.util.Units;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.Preferences;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
import edu.wpi.first.wpilibj.examples.armsimulation.Constants;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import edu.wpi.first.wpilibj.simulation.BatterySim;
|
||||
import edu.wpi.first.wpilibj.simulation.EncoderSim;
|
||||
import edu.wpi.first.wpilibj.simulation.RoboRioSim;
|
||||
import edu.wpi.first.wpilibj.simulation.SingleJointedArmSim;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.Mechanism2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.MechanismLigament2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.MechanismRoot2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj.util.Color;
|
||||
import edu.wpi.first.wpilibj.util.Color8Bit;
|
||||
import org.wpilib.math.controller.PIDController;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.util.Preferences;
|
||||
import org.wpilib.system.RobotController;
|
||||
import org.wpilib.examples.armsimulation.Constants;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
import org.wpilib.simulation.BatterySim;
|
||||
import org.wpilib.simulation.EncoderSim;
|
||||
import org.wpilib.simulation.RoboRioSim;
|
||||
import org.wpilib.simulation.SingleJointedArmSim;
|
||||
import org.wpilib.smartdashboard.Mechanism2d;
|
||||
import org.wpilib.smartdashboard.MechanismLigament2d;
|
||||
import org.wpilib.smartdashboard.MechanismRoot2d;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.util.Color;
|
||||
import org.wpilib.util.Color8Bit;
|
||||
|
||||
public class Arm implements AutoCloseable {
|
||||
// The P gain for the PID controller that drives this arm.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.canpdp;
|
||||
package org.wpilib.examples.canpdp;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.canpdp;
|
||||
package org.wpilib.examples.canpdp;
|
||||
|
||||
import edu.wpi.first.wpilibj.PowerDistribution;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.hardware.power.PowerDistribution;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
|
||||
/**
|
||||
* This is a sample program showing how to retrieve information from the Power Distribution Panel
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.differentialdrivebot;
|
||||
package org.wpilib.examples.differentialdrivebot;
|
||||
|
||||
import edu.wpi.first.math.controller.PIDController;
|
||||
import edu.wpi.first.math.controller.SimpleMotorFeedforward;
|
||||
import edu.wpi.first.math.kinematics.ChassisSpeeds;
|
||||
import edu.wpi.first.math.kinematics.DifferentialDriveKinematics;
|
||||
import edu.wpi.first.math.kinematics.DifferentialDriveOdometry;
|
||||
import edu.wpi.first.math.kinematics.DifferentialDriveWheelSpeeds;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.OnboardIMU;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import org.wpilib.math.controller.PIDController;
|
||||
import org.wpilib.math.controller.SimpleMotorFeedforward;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveKinematics;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveOdometry;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveWheelSpeeds;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.hardware.imu.OnboardIMU;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
|
||||
/** Represents a differential drive style drivetrain. */
|
||||
public class Drivetrain {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.differentialdrivebot;
|
||||
package org.wpilib.examples.differentialdrivebot;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.differentialdrivebot;
|
||||
package org.wpilib.examples.differentialdrivebot;
|
||||
|
||||
import edu.wpi.first.math.filter.SlewRateLimiter;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.XboxController;
|
||||
import org.wpilib.math.filter.SlewRateLimiter;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.driverstation.XboxController;
|
||||
|
||||
public class Robot extends TimedRobot {
|
||||
private final XboxController m_controller = new XboxController(0);
|
||||
|
||||
@@ -2,40 +2,40 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.differentialdriveposeestimator;
|
||||
package org.wpilib.examples.differentialdriveposeestimator;
|
||||
|
||||
import edu.wpi.first.apriltag.AprilTagFieldLayout;
|
||||
import edu.wpi.first.apriltag.AprilTagFields;
|
||||
import edu.wpi.first.math.ComputerVisionUtil;
|
||||
import edu.wpi.first.math.VecBuilder;
|
||||
import edu.wpi.first.math.controller.PIDController;
|
||||
import edu.wpi.first.math.controller.SimpleMotorFeedforward;
|
||||
import edu.wpi.first.math.estimator.DifferentialDrivePoseEstimator;
|
||||
import edu.wpi.first.math.geometry.Pose2d;
|
||||
import edu.wpi.first.math.geometry.Pose3d;
|
||||
import edu.wpi.first.math.geometry.Quaternion;
|
||||
import edu.wpi.first.math.geometry.Rotation3d;
|
||||
import edu.wpi.first.math.geometry.Transform3d;
|
||||
import edu.wpi.first.math.geometry.Translation3d;
|
||||
import edu.wpi.first.math.kinematics.ChassisSpeeds;
|
||||
import edu.wpi.first.math.kinematics.DifferentialDriveKinematics;
|
||||
import edu.wpi.first.math.kinematics.DifferentialDriveWheelSpeeds;
|
||||
import edu.wpi.first.math.numbers.N2;
|
||||
import edu.wpi.first.math.system.LinearSystem;
|
||||
import edu.wpi.first.math.system.plant.DCMotor;
|
||||
import edu.wpi.first.math.system.plant.LinearSystemId;
|
||||
import edu.wpi.first.math.util.Units;
|
||||
import edu.wpi.first.networktables.DoubleArrayEntry;
|
||||
import edu.wpi.first.networktables.DoubleArrayTopic;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.OnboardIMU;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import edu.wpi.first.wpilibj.simulation.DifferentialDrivetrainSim;
|
||||
import edu.wpi.first.wpilibj.simulation.EncoderSim;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.Field2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.vision.apriltag.AprilTagFieldLayout;
|
||||
import org.wpilib.vision.apriltag.AprilTagFields;
|
||||
import org.wpilib.math.util.ComputerVisionUtil;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.controller.PIDController;
|
||||
import org.wpilib.math.controller.SimpleMotorFeedforward;
|
||||
import org.wpilib.math.estimator.DifferentialDrivePoseEstimator;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Pose3d;
|
||||
import org.wpilib.math.geometry.Quaternion;
|
||||
import org.wpilib.math.geometry.Rotation3d;
|
||||
import org.wpilib.math.geometry.Transform3d;
|
||||
import org.wpilib.math.geometry.Translation3d;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveKinematics;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveWheelSpeeds;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.system.LinearSystem;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.wpilib.networktables.DoubleArrayEntry;
|
||||
import org.wpilib.networktables.DoubleArrayTopic;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.hardware.imu.OnboardIMU;
|
||||
import org.wpilib.system.RobotController;
|
||||
import org.wpilib.system.Timer;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
import org.wpilib.simulation.DifferentialDrivetrainSim;
|
||||
import org.wpilib.simulation.EncoderSim;
|
||||
import org.wpilib.smartdashboard.Field2d;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
|
||||
/** Represents a differential drive style drivetrain. */
|
||||
public class Drivetrain {
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.differentialdriveposeestimator;
|
||||
package org.wpilib.examples.differentialdriveposeestimator;
|
||||
|
||||
import edu.wpi.first.math.StateSpaceUtil;
|
||||
import edu.wpi.first.math.VecBuilder;
|
||||
import edu.wpi.first.math.geometry.Pose2d;
|
||||
import edu.wpi.first.math.geometry.Rotation2d;
|
||||
import edu.wpi.first.math.util.Units;
|
||||
import org.wpilib.math.util.StateSpaceUtil;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.util.Units;
|
||||
|
||||
/** This dummy class represents a global measurement sensor, such as a computer vision solution. */
|
||||
public final class ExampleGlobalMeasurementSensor {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.differentialdriveposeestimator;
|
||||
package org.wpilib.examples.differentialdriveposeestimator;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.differentialdriveposeestimator;
|
||||
package org.wpilib.examples.differentialdriveposeestimator;
|
||||
|
||||
import edu.wpi.first.math.filter.SlewRateLimiter;
|
||||
import edu.wpi.first.networktables.DoubleArrayTopic;
|
||||
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.XboxController;
|
||||
import org.wpilib.math.filter.SlewRateLimiter;
|
||||
import org.wpilib.networktables.DoubleArrayTopic;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.driverstation.XboxController;
|
||||
|
||||
public class Robot extends TimedRobot {
|
||||
private final NetworkTableInstance m_inst = NetworkTableInstance.getDefault();
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.digitalcommunication;
|
||||
package org.wpilib.examples.digitalcommunication;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.digitalcommunication;
|
||||
package org.wpilib.examples.digitalcommunication;
|
||||
|
||||
import edu.wpi.first.wpilibj.DigitalOutput;
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import org.wpilib.hardware.discrete.DigitalOutput;
|
||||
import org.wpilib.driverstation.DriverStation;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.drivedistanceoffboard;
|
||||
package org.wpilib.examples.drivedistanceoffboard;
|
||||
|
||||
/**
|
||||
* The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.drivedistanceoffboard;
|
||||
package org.wpilib.examples.drivedistanceoffboard;
|
||||
|
||||
/**
|
||||
* A simplified stub class that simulates the API of a common "smart" motor controller.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.drivedistanceoffboard;
|
||||
package org.wpilib.examples.drivedistanceoffboard;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.drivedistanceoffboard;
|
||||
package org.wpilib.examples.drivedistanceoffboard;
|
||||
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.CommandScheduler;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.CommandScheduler;
|
||||
|
||||
/**
|
||||
* The methods in this class are called automatically corresponding to each mode, as described in
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.drivedistanceoffboard;
|
||||
package org.wpilib.examples.drivedistanceoffboard;
|
||||
|
||||
import edu.wpi.first.wpilibj.XboxController;
|
||||
import edu.wpi.first.wpilibj.examples.drivedistanceoffboard.Constants.OIConstants;
|
||||
import edu.wpi.first.wpilibj.examples.drivedistanceoffboard.subsystems.DriveSubsystem;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.Commands;
|
||||
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
|
||||
import org.wpilib.driverstation.XboxController;
|
||||
import org.wpilib.examples.drivedistanceoffboard.Constants.OIConstants;
|
||||
import org.wpilib.examples.drivedistanceoffboard.subsystems.DriveSubsystem;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.Commands;
|
||||
import org.wpilib.command2.button.CommandXboxController;
|
||||
|
||||
/**
|
||||
* This class is where the bulk of the robot should be declared. Since Command-based is a
|
||||
@@ -48,9 +48,9 @@ public class RobotContainer {
|
||||
|
||||
/**
|
||||
* Use this method to define your button->command mappings. Buttons can be created by
|
||||
* instantiating a {@link edu.wpi.first.wpilibj.GenericHID} or one of its subclasses ({@link
|
||||
* edu.wpi.first.wpilibj.Joystick} or {@link XboxController}), and then passing it to a {@link
|
||||
* edu.wpi.first.wpilibj2.command.button.JoystickButton}.
|
||||
* instantiating a {@link org.wpilib.driverstation.GenericHID} or one of its subclasses ({@link
|
||||
* org.wpilib.driverstation.Joystick} or {@link XboxController}), and then passing it to a {@link
|
||||
* org.wpilib.command2.button.JoystickButton}.
|
||||
*/
|
||||
private void configureButtonBindings() {
|
||||
// Drive at half speed when the bumper is held
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.drivedistanceoffboard.subsystems;
|
||||
package org.wpilib.examples.drivedistanceoffboard.subsystems;
|
||||
|
||||
import edu.wpi.first.math.controller.SimpleMotorFeedforward;
|
||||
import edu.wpi.first.math.trajectory.TrapezoidProfile;
|
||||
import edu.wpi.first.math.trajectory.TrapezoidProfile.State;
|
||||
import edu.wpi.first.util.sendable.SendableRegistry;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
||||
import edu.wpi.first.wpilibj.examples.drivedistanceoffboard.Constants.DriveConstants;
|
||||
import edu.wpi.first.wpilibj.examples.drivedistanceoffboard.ExampleSmartMotorController;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
import org.wpilib.math.controller.SimpleMotorFeedforward;
|
||||
import org.wpilib.math.trajectory.TrapezoidProfile;
|
||||
import org.wpilib.math.trajectory.TrapezoidProfile.State;
|
||||
import org.wpilib.util.sendable.SendableRegistry;
|
||||
import org.wpilib.system.RobotController;
|
||||
import org.wpilib.system.Timer;
|
||||
import org.wpilib.drive.DifferentialDrive;
|
||||
import org.wpilib.examples.drivedistanceoffboard.Constants.DriveConstants;
|
||||
import org.wpilib.examples.drivedistanceoffboard.ExampleSmartMotorController;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.SubsystemBase;
|
||||
|
||||
public class DriveSubsystem extends SubsystemBase {
|
||||
// The motors on the left side of the drive.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.dutycycleencoder;
|
||||
package org.wpilib.examples.dutycycleencoder;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.dutycycleencoder;
|
||||
package org.wpilib.examples.dutycycleencoder;
|
||||
|
||||
import edu.wpi.first.math.MathUtil;
|
||||
import edu.wpi.first.wpilibj.DutyCycleEncoder;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.math.util.MathUtil;
|
||||
import org.wpilib.hardware.rotation.DutyCycleEncoder;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
|
||||
/** This example shows how to use a duty cycle encoder for devices such as an arm or elevator. */
|
||||
public class Robot extends TimedRobot {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.dutycycleinput;
|
||||
package org.wpilib.examples.dutycycleinput;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.dutycycleinput;
|
||||
package org.wpilib.examples.dutycycleinput;
|
||||
|
||||
import edu.wpi.first.wpilibj.DutyCycle;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.hardware.rotation.DutyCycle;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
|
||||
public class Robot extends TimedRobot {
|
||||
private final DutyCycle m_dutyCycle;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorexponentialprofile;
|
||||
package org.wpilib.examples.elevatorexponentialprofile;
|
||||
|
||||
/**
|
||||
* A simplified stub class that simulates the API of a common "smart" motor controller.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorexponentialprofile;
|
||||
package org.wpilib.examples.elevatorexponentialprofile;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorexponentialprofile;
|
||||
package org.wpilib.examples.elevatorexponentialprofile;
|
||||
|
||||
import edu.wpi.first.math.controller.SimpleMotorFeedforward;
|
||||
import edu.wpi.first.math.trajectory.ExponentialProfile;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import org.wpilib.math.controller.SimpleMotorFeedforward;
|
||||
import org.wpilib.math.trajectory.ExponentialProfile;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
|
||||
public class Robot extends TimedRobot {
|
||||
private static double kDt = 0.02;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorexponentialsimulation;
|
||||
package org.wpilib.examples.elevatorexponentialsimulation;
|
||||
|
||||
import edu.wpi.first.math.util.Units;
|
||||
import org.wpilib.math.util.Units;
|
||||
|
||||
public class Constants {
|
||||
public static final int kMotorPort = 0;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorexponentialsimulation;
|
||||
package org.wpilib.examples.elevatorexponentialsimulation;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorexponentialsimulation;
|
||||
package org.wpilib.examples.elevatorexponentialsimulation;
|
||||
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.examples.elevatorexponentialsimulation.subsystems.Elevator;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.examples.elevatorexponentialsimulation.subsystems.Elevator;
|
||||
|
||||
/** This is a sample program to demonstrate the use of elevator simulation. */
|
||||
public class Robot extends TimedRobot {
|
||||
|
||||
@@ -2,26 +2,26 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorexponentialsimulation.subsystems;
|
||||
package org.wpilib.examples.elevatorexponentialsimulation.subsystems;
|
||||
|
||||
import edu.wpi.first.math.controller.ElevatorFeedforward;
|
||||
import edu.wpi.first.math.controller.PIDController;
|
||||
import edu.wpi.first.math.system.plant.DCMotor;
|
||||
import edu.wpi.first.math.trajectory.ExponentialProfile;
|
||||
import edu.wpi.first.math.util.Units;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
import edu.wpi.first.wpilibj.examples.elevatorexponentialsimulation.Constants;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import edu.wpi.first.wpilibj.simulation.BatterySim;
|
||||
import edu.wpi.first.wpilibj.simulation.ElevatorSim;
|
||||
import edu.wpi.first.wpilibj.simulation.EncoderSim;
|
||||
import edu.wpi.first.wpilibj.simulation.PWMMotorControllerSim;
|
||||
import edu.wpi.first.wpilibj.simulation.RoboRioSim;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.Mechanism2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.MechanismLigament2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.MechanismRoot2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.math.controller.ElevatorFeedforward;
|
||||
import org.wpilib.math.controller.PIDController;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.trajectory.ExponentialProfile;
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.system.RobotController;
|
||||
import org.wpilib.examples.elevatorexponentialsimulation.Constants;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
import org.wpilib.simulation.BatterySim;
|
||||
import org.wpilib.simulation.ElevatorSim;
|
||||
import org.wpilib.simulation.EncoderSim;
|
||||
import org.wpilib.simulation.PWMMotorControllerSim;
|
||||
import org.wpilib.simulation.RoboRioSim;
|
||||
import org.wpilib.smartdashboard.Mechanism2d;
|
||||
import org.wpilib.smartdashboard.MechanismLigament2d;
|
||||
import org.wpilib.smartdashboard.MechanismRoot2d;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
|
||||
public class Elevator implements AutoCloseable {
|
||||
// This gearbox represents a gearbox containing 4 Vex 775pro motors.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorprofiledpid;
|
||||
package org.wpilib.examples.elevatorprofiledpid;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorprofiledpid;
|
||||
package org.wpilib.examples.elevatorprofiledpid;
|
||||
|
||||
import edu.wpi.first.math.controller.ElevatorFeedforward;
|
||||
import edu.wpi.first.math.controller.ProfiledPIDController;
|
||||
import edu.wpi.first.math.trajectory.TrapezoidProfile;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import org.wpilib.math.controller.ElevatorFeedforward;
|
||||
import org.wpilib.math.controller.ProfiledPIDController;
|
||||
import org.wpilib.math.trajectory.TrapezoidProfile;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
|
||||
public class Robot extends TimedRobot {
|
||||
private static double kDt = 0.02;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorsimulation;
|
||||
package org.wpilib.examples.elevatorsimulation;
|
||||
|
||||
import edu.wpi.first.math.util.Units;
|
||||
import org.wpilib.math.util.Units;
|
||||
|
||||
public class Constants {
|
||||
public static final int kMotorPort = 0;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorsimulation;
|
||||
package org.wpilib.examples.elevatorsimulation;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorsimulation;
|
||||
package org.wpilib.examples.elevatorsimulation;
|
||||
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.examples.elevatorsimulation.subsystems.Elevator;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.examples.elevatorsimulation.subsystems.Elevator;
|
||||
|
||||
/** This is a sample program to demonstrate the use of elevator simulation. */
|
||||
public class Robot extends TimedRobot {
|
||||
|
||||
@@ -2,25 +2,25 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatorsimulation.subsystems;
|
||||
package org.wpilib.examples.elevatorsimulation.subsystems;
|
||||
|
||||
import edu.wpi.first.math.controller.ElevatorFeedforward;
|
||||
import edu.wpi.first.math.controller.ProfiledPIDController;
|
||||
import edu.wpi.first.math.system.plant.DCMotor;
|
||||
import edu.wpi.first.math.trajectory.TrapezoidProfile;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
import edu.wpi.first.wpilibj.examples.elevatorsimulation.Constants;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import edu.wpi.first.wpilibj.simulation.BatterySim;
|
||||
import edu.wpi.first.wpilibj.simulation.ElevatorSim;
|
||||
import edu.wpi.first.wpilibj.simulation.EncoderSim;
|
||||
import edu.wpi.first.wpilibj.simulation.PWMMotorControllerSim;
|
||||
import edu.wpi.first.wpilibj.simulation.RoboRioSim;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.Mechanism2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.MechanismLigament2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.MechanismRoot2d;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.math.controller.ElevatorFeedforward;
|
||||
import org.wpilib.math.controller.ProfiledPIDController;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.trajectory.TrapezoidProfile;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.system.RobotController;
|
||||
import org.wpilib.examples.elevatorsimulation.Constants;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
import org.wpilib.simulation.BatterySim;
|
||||
import org.wpilib.simulation.ElevatorSim;
|
||||
import org.wpilib.simulation.EncoderSim;
|
||||
import org.wpilib.simulation.PWMMotorControllerSim;
|
||||
import org.wpilib.simulation.RoboRioSim;
|
||||
import org.wpilib.smartdashboard.Mechanism2d;
|
||||
import org.wpilib.smartdashboard.MechanismLigament2d;
|
||||
import org.wpilib.smartdashboard.MechanismRoot2d;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
|
||||
public class Elevator implements AutoCloseable {
|
||||
// This gearbox represents a gearbox containing 4 Vex 775pro motors.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatortrapezoidprofile;
|
||||
package org.wpilib.examples.elevatortrapezoidprofile;
|
||||
|
||||
/**
|
||||
* A simplified stub class that simulates the API of a common "smart" motor controller.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatortrapezoidprofile;
|
||||
package org.wpilib.examples.elevatortrapezoidprofile;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.elevatortrapezoidprofile;
|
||||
package org.wpilib.examples.elevatortrapezoidprofile;
|
||||
|
||||
import edu.wpi.first.math.controller.SimpleMotorFeedforward;
|
||||
import edu.wpi.first.math.trajectory.TrapezoidProfile;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import org.wpilib.math.controller.SimpleMotorFeedforward;
|
||||
import org.wpilib.math.trajectory.TrapezoidProfile;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
|
||||
public class Robot extends TimedRobot {
|
||||
private static double kDt = 0.02;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.encoder;
|
||||
package org.wpilib.examples.encoder;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.encoder;
|
||||
package org.wpilib.examples.encoder;
|
||||
|
||||
import edu.wpi.first.wpilibj.CounterBase;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.hardware.discrete.CounterBase;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
|
||||
/**
|
||||
* Sample program displaying the value of a quadrature encoder on the SmartDashboard. Quadrature
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.eventloop;
|
||||
package org.wpilib.examples.eventloop;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.eventloop;
|
||||
package org.wpilib.examples.eventloop;
|
||||
|
||||
import edu.wpi.first.math.controller.PIDController;
|
||||
import edu.wpi.first.math.controller.SimpleMotorFeedforward;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.event.BooleanEvent;
|
||||
import edu.wpi.first.wpilibj.event.EventLoop;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import org.wpilib.math.controller.PIDController;
|
||||
import org.wpilib.math.controller.SimpleMotorFeedforward;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.event.BooleanEvent;
|
||||
import org.wpilib.event.EventLoop;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
|
||||
public class Robot extends TimedRobot {
|
||||
public static final double SHOT_VELOCITY = 200; // rpm
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.flywheelbangbangcontroller;
|
||||
package org.wpilib.examples.flywheelbangbangcontroller;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.flywheelbangbangcontroller;
|
||||
package org.wpilib.examples.flywheelbangbangcontroller;
|
||||
|
||||
import edu.wpi.first.math.controller.BangBangController;
|
||||
import edu.wpi.first.math.controller.SimpleMotorFeedforward;
|
||||
import edu.wpi.first.math.numbers.N1;
|
||||
import edu.wpi.first.math.system.LinearSystem;
|
||||
import edu.wpi.first.math.system.plant.DCMotor;
|
||||
import edu.wpi.first.math.system.plant.LinearSystemId;
|
||||
import edu.wpi.first.math.util.Units;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import edu.wpi.first.wpilibj.simulation.EncoderSim;
|
||||
import edu.wpi.first.wpilibj.simulation.FlywheelSim;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.math.controller.BangBangController;
|
||||
import org.wpilib.math.controller.SimpleMotorFeedforward;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.system.LinearSystem;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
import org.wpilib.system.RobotController;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
import org.wpilib.simulation.EncoderSim;
|
||||
import org.wpilib.simulation.FlywheelSim;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
|
||||
/**
|
||||
* This is a sample program to demonstrate the use of a BangBangController with a flywheel to
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.gettingstarted;
|
||||
package org.wpilib.examples.gettingstarted;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.gettingstarted;
|
||||
package org.wpilib.examples.gettingstarted;
|
||||
|
||||
import edu.wpi.first.util.sendable.SendableRegistry;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
import edu.wpi.first.wpilibj.XboxController;
|
||||
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import org.wpilib.util.sendable.SendableRegistry;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.system.Timer;
|
||||
import org.wpilib.driverstation.XboxController;
|
||||
import org.wpilib.drive.DifferentialDrive;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
|
||||
/**
|
||||
* The methods in this class are called automatically corresponding to each mode, as described in
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.gyro;
|
||||
package org.wpilib.examples.gyro;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.gyro;
|
||||
package org.wpilib.examples.gyro;
|
||||
|
||||
import edu.wpi.first.util.sendable.SendableRegistry;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.OnboardIMU;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import org.wpilib.util.sendable.SendableRegistry;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
import org.wpilib.hardware.imu.OnboardIMU;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.drive.DifferentialDrive;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
|
||||
/**
|
||||
* This is a sample program to demonstrate how to use a gyro sensor to make a robot drive straight.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.gyromecanum;
|
||||
package org.wpilib.examples.gyromecanum;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.gyromecanum;
|
||||
package org.wpilib.examples.gyromecanum;
|
||||
|
||||
import edu.wpi.first.util.sendable.SendableRegistry;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.OnboardIMU;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.drive.MecanumDrive;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import org.wpilib.util.sendable.SendableRegistry;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
import org.wpilib.hardware.imu.OnboardIMU;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.drive.MecanumDrive;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
|
||||
/**
|
||||
* This is a sample program that uses mecanum drive with a gyro sensor to maintain rotation vectors
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbotinlined;
|
||||
package org.wpilib.examples.hatchbotinlined;
|
||||
|
||||
/**
|
||||
* The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbotinlined;
|
||||
package org.wpilib.examples.hatchbotinlined;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbotinlined;
|
||||
package org.wpilib.examples.hatchbotinlined;
|
||||
|
||||
import edu.wpi.first.wpilibj.DataLogManager;
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.CommandScheduler;
|
||||
import org.wpilib.system.DataLogManager;
|
||||
import org.wpilib.driverstation.DriverStation;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.CommandScheduler;
|
||||
|
||||
/**
|
||||
* The methods in this class are called automatically corresponding to each mode, as described in
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbotinlined;
|
||||
package org.wpilib.examples.hatchbotinlined;
|
||||
|
||||
import edu.wpi.first.wpilibj.PS4Controller;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbotinlined.Constants.OIConstants;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbotinlined.commands.Autos;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbotinlined.subsystems.DriveSubsystem;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbotinlined.subsystems.HatchSubsystem;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.Commands;
|
||||
import edu.wpi.first.wpilibj2.command.button.CommandPS4Controller;
|
||||
import org.wpilib.driverstation.PS4Controller;
|
||||
import org.wpilib.examples.hatchbotinlined.Constants.OIConstants;
|
||||
import org.wpilib.examples.hatchbotinlined.commands.Autos;
|
||||
import org.wpilib.examples.hatchbotinlined.subsystems.DriveSubsystem;
|
||||
import org.wpilib.examples.hatchbotinlined.subsystems.HatchSubsystem;
|
||||
import org.wpilib.smartdashboard.SendableChooser;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.Commands;
|
||||
import org.wpilib.command2.button.CommandPS4Controller;
|
||||
|
||||
/**
|
||||
* This class is where the bulk of the robot should be declared. Since Command-based is a
|
||||
@@ -71,9 +71,9 @@ public class RobotContainer {
|
||||
|
||||
/**
|
||||
* Use this method to define your button->command mappings. Buttons can be created by
|
||||
* instantiating a {@link edu.wpi.first.wpilibj.GenericHID} or one of its subclasses ({@link
|
||||
* edu.wpi.first.wpilibj.Joystick} or {@link PS4Controller}), and then passing it to a {@link
|
||||
* edu.wpi.first.wpilibj2.command.button.JoystickButton}.
|
||||
* instantiating a {@link org.wpilib.driverstation.GenericHID} or one of its subclasses ({@link
|
||||
* org.wpilib.driverstation.Joystick} or {@link PS4Controller}), and then passing it to a {@link
|
||||
* org.wpilib.command2.button.JoystickButton}.
|
||||
*/
|
||||
private void configureButtonBindings() {
|
||||
// Grab the hatch when the Circle button is pressed.
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbotinlined.commands;
|
||||
package org.wpilib.examples.hatchbotinlined.commands;
|
||||
|
||||
import edu.wpi.first.wpilibj.examples.hatchbotinlined.Constants.AutoConstants;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbotinlined.subsystems.DriveSubsystem;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbotinlined.subsystems.HatchSubsystem;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.Commands;
|
||||
import edu.wpi.first.wpilibj2.command.FunctionalCommand;
|
||||
import org.wpilib.examples.hatchbotinlined.Constants.AutoConstants;
|
||||
import org.wpilib.examples.hatchbotinlined.subsystems.DriveSubsystem;
|
||||
import org.wpilib.examples.hatchbotinlined.subsystems.HatchSubsystem;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.Commands;
|
||||
import org.wpilib.command2.FunctionalCommand;
|
||||
|
||||
/** Container for auto command factories. */
|
||||
public final class Autos {
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbotinlined.subsystems;
|
||||
package org.wpilib.examples.hatchbotinlined.subsystems;
|
||||
|
||||
import edu.wpi.first.util.sendable.SendableBuilder;
|
||||
import edu.wpi.first.util.sendable.SendableRegistry;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbotinlined.Constants.DriveConstants;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
import org.wpilib.util.sendable.SendableBuilder;
|
||||
import org.wpilib.util.sendable.SendableRegistry;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.drive.DifferentialDrive;
|
||||
import org.wpilib.examples.hatchbotinlined.Constants.DriveConstants;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
import org.wpilib.command2.SubsystemBase;
|
||||
|
||||
public class DriveSubsystem extends SubsystemBase {
|
||||
// The motors on the left side of the drive.
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbotinlined.subsystems;
|
||||
package org.wpilib.examples.hatchbotinlined.subsystems;
|
||||
|
||||
import static edu.wpi.first.wpilibj.DoubleSolenoid.Value.kForward;
|
||||
import static edu.wpi.first.wpilibj.DoubleSolenoid.Value.kReverse;
|
||||
import static org.wpilib.hardware.pneumatic.DoubleSolenoid.Value.kForward;
|
||||
import static org.wpilib.hardware.pneumatic.DoubleSolenoid.Value.kReverse;
|
||||
|
||||
import edu.wpi.first.util.sendable.SendableBuilder;
|
||||
import edu.wpi.first.wpilibj.DoubleSolenoid;
|
||||
import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbotinlined.Constants.HatchConstants;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
import org.wpilib.util.sendable.SendableBuilder;
|
||||
import org.wpilib.hardware.pneumatic.DoubleSolenoid;
|
||||
import org.wpilib.hardware.pneumatic.PneumaticsModuleType;
|
||||
import org.wpilib.examples.hatchbotinlined.Constants.HatchConstants;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.SubsystemBase;
|
||||
|
||||
/** A hatch mechanism actuated by a single {@link edu.wpi.first.wpilibj.DoubleSolenoid}. */
|
||||
/** A hatch mechanism actuated by a single {@link org.wpilib.hardware.pneumatic.DoubleSolenoid}. */
|
||||
public class HatchSubsystem extends SubsystemBase {
|
||||
private final DoubleSolenoid m_hatchSolenoid =
|
||||
new DoubleSolenoid(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional;
|
||||
package org.wpilib.examples.hatchbottraditional;
|
||||
|
||||
/**
|
||||
* The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional;
|
||||
package org.wpilib.examples.hatchbottraditional;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional;
|
||||
package org.wpilib.examples.hatchbottraditional;
|
||||
|
||||
import edu.wpi.first.wpilibj.DataLogManager;
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.CommandScheduler;
|
||||
import org.wpilib.system.DataLogManager;
|
||||
import org.wpilib.driverstation.DriverStation;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.CommandScheduler;
|
||||
|
||||
/**
|
||||
* The methods in this class are called automatically corresponding to each mode, as described in
|
||||
|
||||
@@ -2,25 +2,25 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional;
|
||||
package org.wpilib.examples.hatchbottraditional;
|
||||
|
||||
import static edu.wpi.first.wpilibj.XboxController.Button;
|
||||
import static org.wpilib.driverstation.XboxController.Button;
|
||||
|
||||
import edu.wpi.first.wpilibj.XboxController;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.Constants.AutoConstants;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.Constants.OIConstants;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.commands.ComplexAuto;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.commands.DefaultDrive;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.commands.DriveDistance;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.commands.GrabHatch;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.commands.HalveDriveSpeed;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.commands.ReleaseHatch;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.subsystems.DriveSubsystem;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.subsystems.HatchSubsystem;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
|
||||
import org.wpilib.driverstation.XboxController;
|
||||
import org.wpilib.examples.hatchbottraditional.Constants.AutoConstants;
|
||||
import org.wpilib.examples.hatchbottraditional.Constants.OIConstants;
|
||||
import org.wpilib.examples.hatchbottraditional.commands.ComplexAuto;
|
||||
import org.wpilib.examples.hatchbottraditional.commands.DefaultDrive;
|
||||
import org.wpilib.examples.hatchbottraditional.commands.DriveDistance;
|
||||
import org.wpilib.examples.hatchbottraditional.commands.GrabHatch;
|
||||
import org.wpilib.examples.hatchbottraditional.commands.HalveDriveSpeed;
|
||||
import org.wpilib.examples.hatchbottraditional.commands.ReleaseHatch;
|
||||
import org.wpilib.examples.hatchbottraditional.subsystems.DriveSubsystem;
|
||||
import org.wpilib.examples.hatchbottraditional.subsystems.HatchSubsystem;
|
||||
import org.wpilib.smartdashboard.SendableChooser;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.button.JoystickButton;
|
||||
|
||||
/**
|
||||
* This class is where the bulk of the robot should be declared. Since Command-based is a
|
||||
@@ -77,9 +77,9 @@ public class RobotContainer {
|
||||
|
||||
/**
|
||||
* Use this method to define your button->command mappings. Buttons can be created by
|
||||
* instantiating a {@link edu.wpi.first.wpilibj.GenericHID} or one of its subclasses ({@link
|
||||
* edu.wpi.first.wpilibj.Joystick} or {@link XboxController}), and then passing it to a {@link
|
||||
* edu.wpi.first.wpilibj2.command.button.JoystickButton}.
|
||||
* instantiating a {@link org.wpilib.driverstation.GenericHID} or one of its subclasses ({@link
|
||||
* org.wpilib.driverstation.Joystick} or {@link XboxController}), and then passing it to a {@link
|
||||
* org.wpilib.command2.button.JoystickButton}.
|
||||
*/
|
||||
private void configureButtonBindings() {
|
||||
// Grab the hatch when the 'A' button is pressed.
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional.commands;
|
||||
package org.wpilib.examples.hatchbottraditional.commands;
|
||||
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.Constants.AutoConstants;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.subsystems.DriveSubsystem;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.subsystems.HatchSubsystem;
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import org.wpilib.examples.hatchbottraditional.Constants.AutoConstants;
|
||||
import org.wpilib.examples.hatchbottraditional.subsystems.DriveSubsystem;
|
||||
import org.wpilib.examples.hatchbottraditional.subsystems.HatchSubsystem;
|
||||
import org.wpilib.command2.SequentialCommandGroup;
|
||||
|
||||
/** A complex auto command that drives forward, releases a hatch, and then drives backward. */
|
||||
public class ComplexAuto extends SequentialCommandGroup {
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional.commands;
|
||||
package org.wpilib.examples.hatchbottraditional.commands;
|
||||
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.subsystems.DriveSubsystem;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import org.wpilib.examples.hatchbottraditional.subsystems.DriveSubsystem;
|
||||
import org.wpilib.command2.Command;
|
||||
import java.util.function.DoubleSupplier;
|
||||
|
||||
/**
|
||||
* A command to drive the robot with joystick input (passed in as {@link DoubleSupplier}s). Written
|
||||
* explicitly for pedagogical purposes - actual code should inline a command this simple with {@link
|
||||
* edu.wpi.first.wpilibj2.command.RunCommand}.
|
||||
* org.wpilib.command2.RunCommand}.
|
||||
*/
|
||||
public class DefaultDrive extends Command {
|
||||
private final DriveSubsystem m_drive;
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional.commands;
|
||||
package org.wpilib.examples.hatchbottraditional.commands;
|
||||
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.subsystems.DriveSubsystem;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import org.wpilib.examples.hatchbottraditional.subsystems.DriveSubsystem;
|
||||
import org.wpilib.command2.Command;
|
||||
|
||||
public class DriveDistance extends Command {
|
||||
private final DriveSubsystem m_drive;
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional.commands;
|
||||
package org.wpilib.examples.hatchbottraditional.commands;
|
||||
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.subsystems.HatchSubsystem;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import org.wpilib.examples.hatchbottraditional.subsystems.HatchSubsystem;
|
||||
import org.wpilib.command2.Command;
|
||||
|
||||
/**
|
||||
* A simple command that grabs a hatch with the {@link HatchSubsystem}. Written explicitly for
|
||||
* pedagogical purposes. Actual code should inline a command this simple with {@link
|
||||
* edu.wpi.first.wpilibj2.command.InstantCommand}.
|
||||
* org.wpilib.command2.InstantCommand}.
|
||||
*/
|
||||
public class GrabHatch extends Command {
|
||||
// The subsystem the command runs on
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional.commands;
|
||||
package org.wpilib.examples.hatchbottraditional.commands;
|
||||
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.subsystems.DriveSubsystem;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import org.wpilib.examples.hatchbottraditional.subsystems.DriveSubsystem;
|
||||
import org.wpilib.command2.Command;
|
||||
|
||||
public class HalveDriveSpeed extends Command {
|
||||
private final DriveSubsystem m_drive;
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional.commands;
|
||||
package org.wpilib.examples.hatchbottraditional.commands;
|
||||
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.subsystems.HatchSubsystem;
|
||||
import edu.wpi.first.wpilibj2.command.InstantCommand;
|
||||
import org.wpilib.examples.hatchbottraditional.subsystems.HatchSubsystem;
|
||||
import org.wpilib.command2.InstantCommand;
|
||||
|
||||
/** A command that releases the hatch. */
|
||||
public class ReleaseHatch extends InstantCommand {
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional.subsystems;
|
||||
package org.wpilib.examples.hatchbottraditional.subsystems;
|
||||
|
||||
import edu.wpi.first.util.sendable.SendableBuilder;
|
||||
import edu.wpi.first.util.sendable.SendableRegistry;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.Constants.DriveConstants;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
import org.wpilib.util.sendable.SendableBuilder;
|
||||
import org.wpilib.util.sendable.SendableRegistry;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.drive.DifferentialDrive;
|
||||
import org.wpilib.examples.hatchbottraditional.Constants.DriveConstants;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
import org.wpilib.command2.SubsystemBase;
|
||||
|
||||
public class DriveSubsystem extends SubsystemBase {
|
||||
// The motors on the left side of the drive.
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hatchbottraditional.subsystems;
|
||||
package org.wpilib.examples.hatchbottraditional.subsystems;
|
||||
|
||||
import static edu.wpi.first.wpilibj.DoubleSolenoid.Value.kForward;
|
||||
import static edu.wpi.first.wpilibj.DoubleSolenoid.Value.kReverse;
|
||||
import static org.wpilib.hardware.pneumatic.DoubleSolenoid.Value.kForward;
|
||||
import static org.wpilib.hardware.pneumatic.DoubleSolenoid.Value.kReverse;
|
||||
|
||||
import edu.wpi.first.util.sendable.SendableBuilder;
|
||||
import edu.wpi.first.wpilibj.DoubleSolenoid;
|
||||
import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
||||
import edu.wpi.first.wpilibj.examples.hatchbottraditional.Constants.HatchConstants;
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
import org.wpilib.util.sendable.SendableBuilder;
|
||||
import org.wpilib.hardware.pneumatic.DoubleSolenoid;
|
||||
import org.wpilib.hardware.pneumatic.PneumaticsModuleType;
|
||||
import org.wpilib.examples.hatchbottraditional.Constants.HatchConstants;
|
||||
import org.wpilib.command2.SubsystemBase;
|
||||
|
||||
/** A hatch mechanism actuated by a single {@link DoubleSolenoid}. */
|
||||
public class HatchSubsystem extends SubsystemBase {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hidrumble;
|
||||
package org.wpilib.examples.hidrumble;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.hidrumble;
|
||||
package org.wpilib.examples.hidrumble;
|
||||
|
||||
import edu.wpi.first.wpilibj.GenericHID.RumbleType;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.XboxController;
|
||||
import org.wpilib.driverstation.GenericHID.RumbleType;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.driverstation.XboxController;
|
||||
|
||||
/** This is a demo program showing the use of GenericHID's rumble feature. */
|
||||
public class Robot extends TimedRobot {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.httpcamera;
|
||||
package org.wpilib.examples.httpcamera;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.httpcamera;
|
||||
package org.wpilib.examples.httpcamera;
|
||||
|
||||
import edu.wpi.first.cameraserver.CameraServer;
|
||||
import edu.wpi.first.cscore.CvSink;
|
||||
import edu.wpi.first.cscore.CvSource;
|
||||
import edu.wpi.first.cscore.HttpCamera;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import org.wpilib.vision.stream.CameraServer;
|
||||
import org.wpilib.vision.camera.CvSink;
|
||||
import org.wpilib.vision.camera.CvSource;
|
||||
import org.wpilib.vision.camera.HttpCamera;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Scalar;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.i2ccommunication;
|
||||
package org.wpilib.examples.i2ccommunication;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.i2ccommunication;
|
||||
package org.wpilib.examples.i2ccommunication;
|
||||
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
import edu.wpi.first.wpilibj.I2C;
|
||||
import edu.wpi.first.wpilibj.I2C.Port;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import org.wpilib.driverstation.DriverStation;
|
||||
import org.wpilib.hardware.bus.I2C;
|
||||
import org.wpilib.hardware.bus.I2C.Port;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.intermediatevision;
|
||||
package org.wpilib.examples.intermediatevision;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.intermediatevision;
|
||||
package org.wpilib.examples.intermediatevision;
|
||||
|
||||
import edu.wpi.first.cameraserver.CameraServer;
|
||||
import edu.wpi.first.cscore.CvSink;
|
||||
import edu.wpi.first.cscore.CvSource;
|
||||
import edu.wpi.first.cscore.UsbCamera;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import org.wpilib.vision.stream.CameraServer;
|
||||
import org.wpilib.vision.camera.CvSink;
|
||||
import org.wpilib.vision.camera.CvSource;
|
||||
import org.wpilib.vision.camera.UsbCamera;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Scalar;
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.mecanumbot;
|
||||
package org.wpilib.examples.mecanumbot;
|
||||
|
||||
import edu.wpi.first.math.controller.PIDController;
|
||||
import edu.wpi.first.math.controller.SimpleMotorFeedforward;
|
||||
import edu.wpi.first.math.geometry.Translation2d;
|
||||
import edu.wpi.first.math.kinematics.ChassisSpeeds;
|
||||
import edu.wpi.first.math.kinematics.MecanumDriveKinematics;
|
||||
import edu.wpi.first.math.kinematics.MecanumDriveOdometry;
|
||||
import edu.wpi.first.math.kinematics.MecanumDriveWheelPositions;
|
||||
import edu.wpi.first.math.kinematics.MecanumDriveWheelSpeeds;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.OnboardIMU;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import org.wpilib.math.controller.PIDController;
|
||||
import org.wpilib.math.controller.SimpleMotorFeedforward;
|
||||
import org.wpilib.math.geometry.Translation2d;
|
||||
import org.wpilib.math.kinematics.ChassisSpeeds;
|
||||
import org.wpilib.math.kinematics.MecanumDriveKinematics;
|
||||
import org.wpilib.math.kinematics.MecanumDriveOdometry;
|
||||
import org.wpilib.math.kinematics.MecanumDriveWheelPositions;
|
||||
import org.wpilib.math.kinematics.MecanumDriveWheelSpeeds;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.hardware.imu.OnboardIMU;
|
||||
import org.wpilib.hardware.motor.PWMSparkMax;
|
||||
|
||||
/** Represents a mecanum drive style drivetrain. */
|
||||
public class Drivetrain {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.mecanumbot;
|
||||
package org.wpilib.examples.mecanumbot;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.mecanumbot;
|
||||
package org.wpilib.examples.mecanumbot;
|
||||
|
||||
import edu.wpi.first.math.filter.SlewRateLimiter;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.XboxController;
|
||||
import org.wpilib.math.filter.SlewRateLimiter;
|
||||
import org.wpilib.opmode.TimedRobot;
|
||||
import org.wpilib.driverstation.XboxController;
|
||||
|
||||
public class Robot extends TimedRobot {
|
||||
private final XboxController m_controller = new XboxController(0);
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.mecanumdrive;
|
||||
package org.wpilib.examples.mecanumdrive;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user