Pedropathing is a community-built FTC library that enables smooth, Bézier-curve-based autonomous paths with built-in PIDF follower correction. This guide covers setup, path creation, and tuning from start to finish.
You should be comfortable with Java and have a working FTC SDK project (SDK 9.x+). You'll need a robot with odometry pods (three-wheel or two-wheel + IMU or Pinpoint) already mounted and wired.
Pedropathing works best with a robot using dead wheel odometry. If you're using drive motor encoders only, accuracy will be limited. On our robot, we use two wheel odometry and a Goblida Pinpoint. I would also recomend using pinpoint for it is more efcient that the built in IMU on the Control Hub
Head over to https://github.com/Pedro-Pathing/Quickstart, the quickstart is the easyist way to start using Pedropathing.
In Constants.java, add an instance of PinpointConstants. Make sure to replace the pinpoint hardware map name with the actual name. We have our constants shown below.
On Pedropathing's website they have defined how to caluclate the offsets for each odom pod, put those values in .fowardPodY and .forwardPodX
Then add .pinpointLocalizer to create follower
public static PinpointConstants localizerConstants = new PinpointConstants()
.forwardPodY(0.0019908630888750972)
.strafePodX(0.0019827227745479285)
.distanceUnit(DistanceUnit.INCH)
.hardwareMapName("pinpoint")
.encoderResolution(GoBildaPinpointDriver.GoBildaOdometryPods.goBILDA_4_BAR_POD)
.forwardEncoderDirection(GoBildaPinpointDriver.EncoderDirection.REVERSED)
.strafeEncoderDirection(GoBildaPinpointDriver.EncoderDirection.REVERSED);
}Pedropathing uses Bézier curves. A simple path has a start pose, control points, and an end pose. The control points shape the curve, you can think of them like 'magnets' that pull the path toward them.
Build your path in a PathChain and add it to a PathBuilder. Chain multiple paths together to create a full auto routine.
The code below shows a very old Auto we made at the start of the Decode season, it clearly shows how we move between paths. Since then we have moved torwards a more complex path chain.
// Paths
private PathChain driveToShoot1, driveToIntake1;
private PathChain driveToShoot2, driveToIntake2;
private PathChain driveToShoot3, driveToIntake3;
##################################################################
// pathBuilder
driveToShoot1 = follower.pathBuilder()
.addPath(new BezierLine(startPose, shootPose))
.setLinearHeadingInterpolation(startPose.getHeading(), shootPose.getHeading())
.build();
driveToIntake1 = follower.pathBuilder()
.addPath(new BezierLine(shootPose, intake1Pose))
.setLinearHeadingInterpolation(shootPose.getHeading(), intake1Pose.getHeading())
.build();Pedropathing's follower has translational, heading, and drive PIDF controllers. Start by tuning translational P, increase it until the robot corrects position errors quickly without oscillating.
Use Panels, a telemetry visualizer that shows the follower's error in real time. In Panels you can adjust PIDF values in real time with re-deploying code. We recomened Brogan M Pratts video on tuning Pedropathing.
Typical starting values: translational P=0.1, D=0.01; heading P=2.0, D=0.05. Every robot is different so your values will be diffrent than ours.
Make sure to tune centripetal scaling or all your turns in Auto will be off! We learned this the hard way!
public static FollowerConstants followerConstants = new FollowerConstants()
.mass(14.06136347) //kg
.forwardZeroPowerAcceleration(-35.55843152303717)
.lateralZeroPowerAcceleration(-72.34510278008105)
.translationalPIDFCoefficients(new PIDFCoefficients(0.39, 0, 0.004, 0.04))
.headingPIDFCoefficients(new PIDFCoefficients(1.3, 0, 0.02, 0.08))
.drivePIDFCoefficients(new FilteredPIDFCoefficients(0.4, 0, 0.0001, 0.6, 0.025))
.centripetalScaling(0.09)
;