-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add project for debugging with MeepMeep
- Loading branch information
1 parent
6fb5f91
commit 5f45e35
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
37
MeepMeepTesting/src/main/java/com/gos/meepmeeptesting/Main.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ include ':FtcRobotController' | |
include ':TeamCode' | ||
|
||
include ':GosLibRr' | ||
include ':MeepMeepTesting' |