Skip to content

Exporting Code

Turn your visualized paths into runnable robot code or shareable animations.

The exporting process is simple and unified under a single dialog window.

  1. Open the Export Dialog: Click the Export button in the top-right corner of the visualizer’s navigation bar. Alternatively, use the shortcut Ctrl + Shift + J (or Cmd + Shift + J on macOS) to quick-open to Java mode.
  2. Select a Format: Use the segmented control at the top of the dialog to switch between Java Class, Sequential Command, Points Array, Animation, or .PP (JSON) formats.
  3. Adjust Options: Depending on the format you selected, customize the settings (such as “Generate Full Class”, “Package Name”, or Animation FPS) using the controls below the code preview.
  4. Save or Copy:
    • Click Copy to Clipboard to quickly paste the generated code into Android Studio.
    • Click Save to File to download the code as a .java, .txt, .pp, or image file to your computer.

Generates a complete, standalone OpMode for your autonomous routine. This does not support all the functionality of the program due to current limitaions.

  • Full Class: Creates a ready-to-run file including the OpMode structure, state machine, and path definitions.
  • Snippets: Uncheck “Generate Full Class” to get just the PathChain construction code for copy-pasting into your own classes.
  • Hardcoded Paths: The geometry is baked into the Java file. You do not need to upload the .pp file to the robot.
  • Event Markers: Automatically generates addEventMarker calls and placeholder comments for registering your commands.

Generates a SequentialCommandGroup for use with command-based frameworks.

  • Supported Libraries:
    • SolversLib: Standard integration.
    • NextFTC: Experimental support.
  • Dynamic Loading: This mode uses PedroPathReader to load path data from the .pp file at runtime. You must upload your .pp file to the robot for this to work.
  • Features: Automatically handles FollowPath, Wait, and event triggers using ParallelRaceGroup.

To use the command-based exports you need to add the JitPack repository and the PedroPathingPlus dependency to your teamcode Gradle configuration (for example, build.gradle):

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

And add the dependency (use the newest release instead of the version shown):

implementation 'com.github.Mallen220:PedroPathingPlus:1.0.6'
  • Points List: A raw array of coordinates (e.g., [(10, 10), (20, 20)]) for custom processing or debugging.
  • Project File (.pp): Download the source file to share with teammates or back up your work.

Create high-quality visualizers to share your strategy.

  • Formats:
    • GIF: Best for compatibility (Discord, Slack).
    • APNG: Higher quality with transparency support, and smaller file sizes.
  • Quality Controls: Adjust FPS, Scale, and Quality to balance file size and visual fidelity.
  • Search (Ctrl+F): Quickly find specific lines or markers in the generated code.
  • Package Name: Set your team’s package (e.g., org.firstinspires.ftc.teamcode) to fix imports automatically.
  • Save to File: Directly save .java or .txt files to your computer.