SharpAI
/

Draw the route. Take the Java.

How this works

Drag the waypoints, or click anywhere on the field to add one. Arrow keys nudge the selection, shift for 5″, delete removes it, space plays and ⌘Z steps back.

x runs right, y runs up the field, heading 0 faces +x and turns counter-clockwise — Pedro’s convention, not the SDK’s. Squares are 24″ tiles.

The clock is an estimate from distance and your speed limit alone. It does not know your motors, your weight or how much traction you have, so a real robot will be slower.

0.0s / 3.9s(116 in)
0.0s / 3.9s · 116 in · x 9.0 · y 60.0 · 0°

Current robot position

X 9.00Y 60.00Heading 0°

Starting point

Robot

A mecanum robot strafes slower than it drives, so the two speeds are separate. The 3.9s estimate is geometry and these limits only — no traction, weight or heading cost — so a real robot will be slower. Over a 144″ field most legs never reach top speed at all; acceleration is usually what binds.

Click the field to add a point · arrows nudge, shift for 5″ · delete removes · space plays · CtrlZ undoes

Path chains (1)

Each chain becomes its own PathChain, followed in order. An action becomes a call after that chain finishes — Pedro documents no mid-path callback, so split a chain in two if you need one partway along.

Waypoints (3)

namexyheading°

Leg 1 → 2

Obstacles (0)

    Anything the robot must not drive through. Checked against the footprint along the whole route.

    Import existing Java

    Pedro Pathing code

    Match the export to your installed Pedro version. Configure your Constants class and implement any TODO actions before running.

    package org.firstinspires.ftc.teamcode.autos;
    
    import com.pedropathing.api.PoseFactory;
    import com.pedropathing.follower.Follower;
    import com.pedropathing.math.Pose;
    import com.pedropathing.paths.Path;
    import static com.pedropathing.api.Paths.*;
    import org.firstinspires.ftc.teamcode.pedro.Constants;
    import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
    import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
    
    @Autonomous(name = "GeneratedAuto")
    public class GeneratedAuto extends LinearOpMode {
        private final PoseFactory p = PoseFactory.degrees();
        private Follower follower;
        private final Pose startPose = p.of(9, 60, 0);
        private final Pose scorePose = p.of(60, 84, 90);
        private final Pose pickupPose = p.of(108, 60, 0);
    
        private Path route() {
            return path(
            line(startPose, scorePose).linear(startPose, scorePose, 0.8),
            curve(scorePose, p.of(84, 96, 0), pickupPose).linear(scorePose, pickupPose, 0.8)
        );
        }
    
        @Override
        public void runOpMode() {
            follower = Constants.create(hardwareMap);
            follower.setPose(startPose);
            waitForStart();
            if (isStopRequested()) return;
            follower.follow(route());
            while (opModeIsActive() && follower.isBusy()) { follower.update(); idle(); }
            if (!opModeIsActive()) return;
        }
    
        private void pause(double seconds) {
            long end = System.nanoTime() + (long) (seconds * 1_000_000_000L);
            while (opModeIsActive() && System.nanoTime() < end) { follower.update(); idle(); }
        }
    
    }