Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of Memory Error #13

Open
RAMENtheNOODLES opened this issue Dec 1, 2024 · 0 comments
Open

Out of Memory Error #13

RAMENtheNOODLES opened this issue Dec 1, 2024 · 0 comments

Comments

@RAMENtheNOODLES
Copy link

When I attempt to run Meep Meep, I keep getting an Out of Memory Error. I tried increasing the amount of memory allocated towards it, but I could not get it to work.

Here is my code:

package spudnik.team24288.meepmeeptesting;

import com.acmerobotics.roadrunner.Pose2d;
import com.acmerobotics.roadrunner.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)
                .build();

        myBot.runAction(myBot.getDrive().actionBuilder(new Pose2d(7.00, -70.00, Math.toRadians(90.00)))
                .splineToConstantHeading(new Vector2d(7.00, -25.00), Math.toRadians(90.00))
                .splineTo(new Vector2d(7.00, -45.00), Math.toRadians(90.00))
                .splineToConstantHeading(new Vector2d(50.00, -35.00), Math.toRadians(90.00))
                .splineTo(new Vector2d(50.00, -60.00), Math.toRadians(-90.00))
                .splineToConstantHeading(new Vector2d(60.00, -60.00), Math.toRadians(90.00))
                .splineTo(new Vector2d(60.00, -35.00), Math.toRadians(90.00))
                .splineTo(new Vector2d(60.00, -60.00), Math.toRadians(-90.00))
                .splineTo(new Vector2d(48.00, -52.00), Math.toRadians(-90.00))
                .splineTo(new Vector2d(48.00, -70.00), Math.toRadians(-90.00))
                .splineTo(new Vector2d(7.00, -25.00), Math.toRadians(90.00)).build());

        meepMeep.setBackground(MeepMeep.Background.FIELD_INTO_THE_DEEP_OFFICIAL)
                .setDarkMode(true)
                .setBackgroundAlpha(0.95f)
                .addEntity(myBot)
                .start();
    }
}

And here is the error:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at java.base/java.lang.Double.valueOf(Double.java:632)
	at com.acmerobotics.roadrunner.Math.rangeCentered(Math.kt:60)
	at com.acmerobotics.roadrunner.Profiles.samplePathByRotation(Profiles.kt:651)
	at com.acmerobotics.roadrunner.Profiles.profile(Profiles.kt:673)
	at com.acmerobotics.roadrunner.TrajectoryBuilder.build(Builders.kt:849)
	at com.acmerobotics.roadrunner.TrajectoryActionBuilder.endTrajectory(Actions.kt:251)
	at com.acmerobotics.roadrunner.TrajectoryActionBuilder.build(Actions.kt:766)
	at spudnik.team24288.meepmeeptesting.MeepMeepTesting.main(MeepMeepTesting.java:31)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant