Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Keobkeig committed Jan 26, 2024
2 parents 23367ea + 4349286 commit d446c18
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.11
- name: Set up JDK 1.17
uses: actions/setup-java@v1
with:
java-version: 1.11
java-version: 1.17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ allprojects {

// Set this to the latest version of StuyLib.
// You can check here: https://github.com/StuyPulse/StuyLib/releases.
final String STUYLIB_VERSION = 'v2024.1.2'
final String STUYLIB_VERSION = 'v2024.1.4'

def ROBOT_MAIN_CLASS = "com.stuypulse.robot.Main"

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project DeployUtils.
Expand Down
10 changes: 1 addition & 9 deletions src/main/java/com/stuypulse/robot/commands/AngleAlign.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.stuypulse.robot.subsystems.vision.AbstractVision;
import com.stuypulse.stuylib.control.angle.feedback.AnglePIDController;
import com.stuypulse.stuylib.math.Angle;
import com.stuypulse.stuylib.streams.angles.AFuser;
import com.stuypulse.stuylib.streams.booleans.BStream;
import com.stuypulse.stuylib.streams.booleans.filters.BDebounceRC;
import com.stuypulse.stuylib.streams.numbers.filters.IFilter;
Expand All @@ -20,7 +19,6 @@ public class AngleAlign extends Command {
private final AbstractOdometry odometry;
private final AbstractVision vision;

private final AFuser angleError;
private IFilter speedAdjFilter;

protected final AnglePIDController angleController;
Expand All @@ -32,11 +30,6 @@ public AngleAlign() {
this.odometry = Odometry.getInstance();
this.vision = AbstractVision.getInstance();

this.angleError = new AFuser(Alignment.FUSION_FILTER.get(),
() -> Angle.fromRotation2d(vision.getOutput().get(0).getPrimaryTag().getPose().toPose2d().getRotation()),
() -> Angle.fromRotation2d(odometry.getPose().getRotation())
);

this.speedAdjFilter = new LowPassFilter(Alignment.SPEED_ADJ_FILTER.get());

this.angleController = new AnglePIDController(Alignment.Rotation.P, Alignment.Rotation.I, Alignment.Rotation.D);
Expand All @@ -51,7 +44,7 @@ public AngleAlign() {

public boolean isAligned() {
// check to see if the robot is within a threshold of the april tag target
return Math.abs(angleError.get().toDegrees()) < Alignment.ALIGNED_THRESHOLD_ANGLE.get();
return false;
}

private double getTurn() {
Expand All @@ -68,7 +61,6 @@ private double getTurn() {
public void initialize() {
odometry.resetOdometery(odometry.getPose());
angleController.reset();
angleError.reset();
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: java
jdk:
- openjdk11
- openjdk17
notifications:
slack:
secure: GWdq7VvpCs+Z1Q3+VIsL6q0eRetGibSWKsNn5OwDgWSnbgKfLEWGPYcvzz6LPV5xE1dOO8aD6NyMhFotxSCDRXC34L4piExFSeY7bCpGaqRMEO2uolSu8hmyowJ6arksl20acnAGCf9UbwEDKKqcM13aOIMeBzbvJHzA18bWsSvnMDFOdGzTgG1577ZODb2D9iTI6gTK5aYQg0jvySG0jN0AFTFGEkJegOepflLsjOfWuX5OXRpUqrkBrh0YYrTL+v7qUdgvYxXjCqCU2iy1+cl21J31cbYirYxrW0z9T2wpdsCufSmPsd6OrMdH7gYpo7vBPNbiY4XLsQ2iMufGcLCpQ6pwGBkHc44MQGIMxV3y6RTAkmoDYYJhaO8eIngo8xUvmXeTV3Pc/qqCv/3TZxJzpFamak6bHbMBi/FObYuUU2OaQHSkzQQseEnjilX25KZ+axiaOkZBEj0UxHvQO6+UZxVbQAM2lBjf3KI6Q2209EiY83XcvA85qI3cF36lmIYmdM0pKPHglT3DwIC1KcbtzgTTX9Xhi96rBOgh6ReYcuQUpm5wjs+BWey+P6vJLcm3NpmMHoTEbMMa5Jm/T6iKQPsjXEoh5b2gwx9EUTGcfhXzwbybLyMjgReWDfHUXfyZU+mX9PYWSeCPXTIJ1TVpx7F10au8d7vJQC7IOUU=
6 changes: 3 additions & 3 deletions vendordeps/PathplannerLib.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileName": "PathplannerLib.json",
"name": "PathplannerLib",
"version": "2024.1.2",
"version": "2024.1.3",
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786",
"frcYear": "2024",
"mavenUrls": [
Expand All @@ -12,15 +12,15 @@
{
"groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-java",
"version": "2024.1.2"
"version": "2024.1.3"
}
],
"jniDependencies": [],
"cppDependencies": [
{
"groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-cpp",
"version": "2024.1.2",
"version": "2024.1.3",
"libName": "PathplannerLib",
"headerClassifier": "headers",
"sharedLibrary": false,
Expand Down
50 changes: 25 additions & 25 deletions vendordeps/Phoenix6.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"fileName": "Phoenix6.json",
"name": "CTRE-Phoenix (v6)",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"frcYear": 2024,
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
"mavenUrls": [
"https://maven.ctr-electronics.com/release/"
],
"jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2024-beta-latest.json",
"jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2024-latest.json",
"conflictsWith": [
{
"uuid": "3fcf3402-e646-4fa6-971e-18afe8173b1a",
Expand All @@ -19,14 +19,14 @@
{
"groupId": "com.ctre.phoenix6",
"artifactId": "wpiapi-java",
"version": "24.0.0-beta-8"
"version": "24.1.0"
}
],
"jniDependencies": [
{
"groupId": "com.ctre.phoenix6",
"artifactId": "tools",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -39,7 +39,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "tools-sim",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -52,7 +52,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonSRX",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -65,7 +65,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonFX",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -78,7 +78,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simVictorSPX",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -91,7 +91,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simPigeonIMU",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -104,7 +104,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simCANCoder",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -117,7 +117,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFX",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -130,7 +130,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANcoder",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -143,7 +143,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProPigeon2",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -158,7 +158,7 @@
{
"groupId": "com.ctre.phoenix6",
"artifactId": "wpiapi-cpp",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_Phoenix6_WPI",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -173,7 +173,7 @@
{
"groupId": "com.ctre.phoenix6",
"artifactId": "tools",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_PhoenixTools",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -188,7 +188,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "wpiapi-cpp-sim",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_Phoenix6_WPISim",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -203,7 +203,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "tools-sim",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_PhoenixTools_Sim",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -218,7 +218,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonSRX",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_SimTalonSRX",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -233,7 +233,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonFX",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_SimTalonFX",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -248,7 +248,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simVictorSPX",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_SimVictorSPX",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -263,7 +263,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simPigeonIMU",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_SimPigeonIMU",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -278,7 +278,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simCANCoder",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_SimCANCoder",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -293,7 +293,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFX",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_SimProTalonFX",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -308,7 +308,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANcoder",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_SimProCANcoder",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -323,7 +323,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProPigeon2",
"version": "24.0.0-beta-8",
"version": "24.1.0",
"libName": "CTRE_SimProPigeon2",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand Down

0 comments on commit d446c18

Please sign in to comment.