Skip to content

Commit

Permalink
Add project for debugging with MeepMeep
Browse files Browse the repository at this point in the history
  • Loading branch information
pjreiniger committed Sep 23, 2024
1 parent 6fb5f91 commit 5f45e35
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .run/MeepMeep.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MeepMeep" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.gos.meepmeeptesting.Main" />
<module name="rr_quickstart.MeepMeepTesting.main" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.gos.meepmeeptesting.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
16 changes: 16 additions & 0 deletions MeepMeepTesting/build.gradle
Original file line number Diff line number Diff line change
@@ -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'
}
37 changes: 37 additions & 0 deletions MeepMeepTesting/src/main/java/com/gos/meepmeeptesting/Main.java
Original file line number Diff line number Diff line change
@@ -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();
}
}
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ include ':FtcRobotController'
include ':TeamCode'

include ':GosLibRr'
include ':MeepMeepTesting'

0 comments on commit 5f45e35

Please sign in to comment.