Skip to content

6165-MSET-CuttleFish/MeepMeep

Repository files navigation

MeepMeep

Release

Path creation/visualization tool for Road Runner

MeepMeep Sample Recording

🔨 Installing

Gradle Snippet:

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.NoahBres:MeepMeep:1.0.6'
}

Installation Video

YouTube Installation Video

Run Sample

package com.example.meepmeeptesting;

import com.acmerobotics.roadrunner.geometry.Pose2d;
import com.noahbres.meepmeep.MeepMeep;
import com.noahbres.meepmeep.core.colorscheme.scheme.ColorSchemeRedDark;

public class MeepMeepTesting {
    public static void main(String[] args) {
        // TODO: If you experience poor performance, enable this flag
        // System.setProperty("sun.java2d.opengl", "true");

        // Declare a MeepMeep instance
        // With a field size of 800 pixels
        MeepMeep mm = new MeepMeep(800)
                // Set field image
                .setBackground(MeepMeep.Background.FIELD_ULTIMATE_GOAL_DARK)
                // Set theme
                .setTheme(new ColorSchemeRedDark())
                // Background opacity from 0-1
                .setBackgroundAlpha(1f)
                // Set constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
                .setConstraints(60, 60, Math.toRadians(180), Math.toRadians(180), 15)
                .followTrajectorySequence(drive ->
                        drive.trajectorySequenceBuilder(new Pose2d(0, 0, 0))
                                .forward(30)
                                .turn(Math.toRadians(90))
                                .forward(30)
                                .turn(Math.toRadians(90))
                                .forward(30)
                                .turn(Math.toRadians(90))
                                .forward(30)
                                .turn(Math.toRadians(90))
                                .build()
                )
                .start();
    }
}

Poor Performance?

On some systems hardware acceleration may not be enabled by default where it could be used. To enable hardware acceleration use the cli flag: -Dsun.java2d.opengl=true or enable it before initializing your MeepMeep instance with System.setProperty("sun.java2d.opengl", "true");.

Notes:

Default Bot Constraints

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%