From 5f45e3563b7aed5d3969e41479ae82400945a45b Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Mon, 23 Sep 2024 17:30:28 -0400 Subject: [PATCH] Add project for debugging with MeepMeep --- .run/MeepMeep.run.xml | 15 ++++++++ MeepMeepTesting/build.gradle | 16 ++++++++ .../java/com/gos/meepmeeptesting/Main.java | 37 +++++++++++++++++++ settings.gradle | 1 + 4 files changed, 69 insertions(+) create mode 100644 .run/MeepMeep.run.xml create mode 100644 MeepMeepTesting/build.gradle create mode 100644 MeepMeepTesting/src/main/java/com/gos/meepmeeptesting/Main.java diff --git a/.run/MeepMeep.run.xml b/.run/MeepMeep.run.xml new file mode 100644 index 0000000..0d4912f --- /dev/null +++ b/.run/MeepMeep.run.xml @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/MeepMeepTesting/build.gradle b/MeepMeepTesting/build.gradle new file mode 100644 index 0000000..9a86256 --- /dev/null +++ b/MeepMeepTesting/build.gradle @@ -0,0 +1,16 @@ +plugins { + id 'java-library' +} + +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} + +repositories { + maven { url = 'https://maven.brott.dev/' } +} + +dependencies { + implementation 'com.acmerobotics.roadrunner:MeepMeep:0.1.6' +} diff --git a/MeepMeepTesting/src/main/java/com/gos/meepmeeptesting/Main.java b/MeepMeepTesting/src/main/java/com/gos/meepmeeptesting/Main.java new file mode 100644 index 0000000..384d717 --- /dev/null +++ b/MeepMeepTesting/src/main/java/com/gos/meepmeeptesting/Main.java @@ -0,0 +1,37 @@ +package com.gos.meepmeeptesting; + +import com.acmerobotics.roadrunner.Pose2d; +import com.acmerobotics.roadrunner.SleepAction; +import com.acmerobotics.roadrunner.Vector2d; +import com.noahbres.meepmeep.MeepMeep; +import com.noahbres.meepmeep.roadrunner.DefaultBotBuilder; +import com.noahbres.meepmeep.roadrunner.DriveShim; +import com.noahbres.meepmeep.roadrunner.entity.RoadRunnerBotEntity; + +public class Main { + public static void main(String[] args) { + MeepMeep meepMeep = new MeepMeep(800); + + RoadRunnerBotEntity myBot = new DefaultBotBuilder(meepMeep) + // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width + .setConstraints(60, 60, Math.toRadians(180), Math.toRadians(180), 15) + .build(); + + myBot.runAction(myBot.getDrive().actionBuilder(new Pose2d(0, 0, 0)) + .lineToX(30) + .turn(Math.toRadians(90)) + .lineToY(30) + .turn(Math.toRadians(90)) + .lineToX(0) + .turn(Math.toRadians(90)) + .lineToY(0) + .turn(Math.toRadians(90)) + .build()); + + meepMeep.setBackground(MeepMeep.Background.FIELD_INTO_THE_DEEP_JUICE_DARK) + .setDarkMode(true) + .setBackgroundAlpha(0.95f) + .addEntity(myBot) + .start(); + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 15b50fe..ff46b73 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,3 +2,4 @@ include ':FtcRobotController' include ':TeamCode' include ':GosLibRr' +include ':MeepMeepTesting'