32 lines
1.5 KiB
Java
32 lines
1.5 KiB
Java
package com.example.meepmeeptesting;
|
|
|
|
import com.acmerobotics.roadrunner.geometry.Pose2d;
|
|
import com.acmerobotics.roadrunner.geometry.Vector2d;
|
|
import com.noahbres.meepmeep.MeepMeep;
|
|
import com.noahbres.meepmeep.roadrunner.DefaultBotBuilder;
|
|
import com.noahbres.meepmeep.roadrunner.entity.RoadRunnerBotEntity;
|
|
|
|
public class MeepMeepTesting {
|
|
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)
|
|
.followTrajectorySequence(drive ->
|
|
drive.trajectorySequenceBuilder(new Pose2d(-51.5, 33.6,Math.toRadians(180)))
|
|
// .lineToConstantHeading(new Vector2d(-45,59.5))
|
|
.setTangent(Math.toRadians(90))
|
|
.splineToConstantHeading(new Pose2d(-48,59.5).vec(),Math.toRadians(0))
|
|
.lineToConstantHeading(new Pose2d(33,59.5).vec())
|
|
.splineToConstantHeading(new Pose2d(52.5, 36).vec(),Math.toRadians(0))
|
|
.build()
|
|
);
|
|
|
|
meepMeep.setBackground(MeepMeep.Background.FIELD_CENTERSTAGE_JUICE_DARK)
|
|
.setDarkMode(true)
|
|
.setBackgroundAlpha(0.95f)
|
|
.addEntity(myBot)
|
|
.start();
|
|
}
|
|
} |