Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>LemLib Auton VisualizerNew to Visual Studio Code? Get it now.
LemLib Auton Visualizer

LemLib Auton Visualizer

Daniel Taich

|
2 installs
| (0) | Free
Plots the LemLib autonomous routines in your auton.cpp on a VEX field in a sidebar, in the style of path.jerry.io, with headings, timing and everything that happens between motions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LemLib Auton Visualizer

A VS Code sidebar that draws your team's LemLib autonomous routines on the VEX field, in the style of path.jerry.io. It reads the routines straight from your auton.cpp, so the picture always matches the code. You can also drag points on the field to change the code.

What you get:

  • Every place the robot drives to is a numbered point on the field, with a short line showing which way the robot faces there.
  • The path between points is coloured by speed (blue is slow, yellow is fast) and dashed when the robot drives backwards.
  • Click a point to find it in your code. Drag a point, or the knob on its direction line, to change the numbers in your code.
  • Match or skills field, zoom, and a ▶ button to watch the robot drive the route.

Contents

  1. What you need
  2. Install it
  3. Set it up for your project
  4. Tune it to your robot
  5. Using it
  6. Coordinates
  7. What it understands
  8. Troubleshooting
  9. For developers

1. What you need

  • VS Code 1.74 or newer. The VS Code that the PROS extension uses works fine.
  • A PROS project that uses LemLib. It's written for LemLib 0.5 (moveToPose, moveToPoint, turnToHeading …). The LemLib 0.4 moveTo / turnTo calls work too.
  • Node.js (LTS), only if you are the person building the install file in option A below. Get it from nodejs.org. Everyone else on the team doesn't need it.

2. Install it

Pick one of these. Option A is best for a team.

Option A: install from a .vsix file (recommended)

One person builds the file once and shares it. Everyone else just installs it.

To build the file (one person):

  1. Open a terminal in this folder. In VS Code: File → Open Folder…, pick autonvisualizerextension, then Terminal → New Terminal.
  2. Check that Node.js is installed:
    node -v
    
    If you see a version number such as v20.11.0, you're good. If it says the command isn't recognised, install Node.js LTS from nodejs.org, then close and reopen VS Code.
  3. Build the file:
    npm run package
    
    This creates lemlib-auton-visualizer-0.2.0.vsix in the folder. The first run downloads Microsoft's packaging tool, vsce, which takes a moment.
  4. Share that .vsix file with the team, for example on Google Drive, Discord, or a USB stick.

To install the file (everyone):

  1. In VS Code, open the Extensions view (Ctrl+Shift+X, or Cmd+Shift+X on Mac).
  2. Click the ⋯ menu at the top of the Extensions view → Install from VSIX…
  3. Pick the .vsix file. When VS Code asks, click Reload.
  4. A new Auton Visualizer icon (a little field with a path) appears in the Activity Bar on the left.

You can also install from a terminal: code --install-extension lemlib-auton-visualizer-0.2.0.vsix

To update later: build a new .vsix and install it the same way. It replaces the old version.

Option B: try it without installing

This is useful if you are changing the extension's code.

  1. File → Open Folder… and open this folder (autonvisualizerextension).
  2. Press F5. A second VS Code window opens, titled [Extension Development Host], with the extension loaded and the examples folder open.
  3. In that window, open auton.cpp and click the Auton Visualizer icon in the left Activity Bar.
  4. After changing the extension's code, press Ctrl+R in that window to reload it.

Option C: copy the folder

Copy this whole folder into your VS Code extensions folder, then restart VS Code:

  • Windows: %USERPROFILE%\.vscode\extensions\lemlib-auton-visualizer
  • macOS / Linux: ~/.vscode/extensions/lemlib-auton-visualizer

3. Set it up for your project

  1. Open your PROS project folder in VS Code (the folder that contains project.pros).
  2. Open the file with your autons, for example src/auton.cpp, and click the Auton Visualizer icon in the Activity Bar. Your routines appear in the dropdown at the top.
    • If no C++ file is open, the extension looks for one named auton*.cpp, autons*.cpp, autonomous*.cpp, routes*.cpp or routines*.cpp on its own.
    • Any function that calls chassis.moveToPose, moveToPoint, turnToHeading and so on, or chassis.setPose, counts as a routine. It doesn't matter what your chassis variable is called.
    • A ▶ Show in Auton Visualizer link also appears above each routine in the code.
  3. Start every routine with chassis.setPose(x, y, θ). Without it the robot starts at (0, 0) facing 0°.
  4. Pick the field with the menu in the top-left corner of the field:
    • Auto (default): the skills field for routines with "skill" in their name, such as progSkills, and the match field for everything else.
    • Match or Skills: always that field.
  5. Optional: make it bigger. Click ⤢ in the toolbar to open the visualizer in an editor tab. You can also drag the sidebar view to the right-hand (secondary) sidebar.
  6. Do section 4 so the times are realistic.

4. Tune it to your robot

The path shapes come from your code. The speeds and times depend on how fast your robot is. The defaults are a guess, so spend five minutes measuring your robot.

Open Settings (Ctrl+,), search for Auton Visualizer, and set:

Setting Default How to measure it
maxVelocity 70 in/s Drive straight at full power across 4 tiles (96 in) and time it. Use 96 ÷ seconds, measured after the robot reaches full speed.
acceleration 150 in/s² Roughly max speed ÷ the time it takes to reach full speed. 150 means about half a second.
maxAngularVelocity 400 °/s Spin in place at full power for 3 turns (1080°) and time it. Use 1080 ÷ seconds.
angularAcceleration 2000 °/s² Leave it unless turns look clearly too quick or too slow.
trackWidth 12 in Distance between the left and right wheels, measured centre to centre. Used for swing turns.
robotWidth / robotLength 15 in The robot's size, so the outline on the field is right.
defaultLead 0.6 LemLib's default boomerang lead. Only change it if your code changes it globally.
field auto auto, match or skills, the same as the menu on the field.
fieldImage (empty) Leave empty for the built-in fields, none for plain tiles, or the path to your own picture. A custom picture must be cropped to the field walls, with +Y pointing up.
codeLens on Shows the "▶ Show in Auton Visualizer" link above routines.

Share the settings with the team: create .vscode/settings.json in your PROS project and commit it. Everyone then gets the same numbers:

{
  "autonVisualizer.maxVelocity": 62,
  "autonVisualizer.maxAngularVelocity": 330,
  "autonVisualizer.trackWidth": 11.5,
  "autonVisualizer.robotWidth": 14.5,
  "autonVisualizer.robotLength": 16
}

5. Using it

Reading the field

The Key under the field explains every symbol. Click "Key" to fold it away.

  • Numbered dots are the points, in order:
    • blue dots are places the robot drives to;
    • purple dots are turns in place;
    • S is where the robot starts.
  • The short line on each dot shows which way the robot faces there.
  • The line between points is the path. Its colour is the speed, from blue (slow) to yellow (fast). A dashed line means the robot drives backwards.
  • Hover over a point to see where it is, which way the robot faces, its top speed and when it gets there. Hover over a path to see the speed at that spot.
  • Under the field you'll find the number of points and roughly how long the routine takes. The time turns yellow if it's over 15 s.

Finding things in the code

  • Click a point or a path and the matching line in the editor is highlighted. If points overlap, click again to cycle through them.
  • Click on a motion in the code (for example a moveToPose line) and it works the other way round:
    • that line is highlighted in the editor;
    • the point flashes on the field, and the view pans to it if you're zoomed in;
    • its popup opens, showing where it is, which way the robot faces, its top speed and when it arrives.
  • Clicking anywhere else inside a routine selects the matching point quietly, and moving into another function switches to that routine.

Dragging points (edits your code)

  • Drag a numbered dot (moveToPose, moveToPoint) or the S (setPose) to move it. It snaps to 0.5 in; hold Shift while dragging for whole inches.
  • Drag the small knob at the end of a direction line to rotate it (moveToPose, turnToHeading, swingToHeading, setPose). It snaps to 1°; hold Shift for 15° steps.
  • The path updates live while you drag. When you let go, the numbers in your code are rewritten.
    • Ctrl+Z in the editor undoes the whole drag.
    • The file is changed but not saved. Press Ctrl+S when you're happy with it.
  • Only plain numbers are rewritten. If a value is calculated, such as -TILE * 2 or a variable, the drag is refused so you don't lose it. Hold Ctrl while dragging to replace it with a number anyway.

Zoom and playback

  • Zoom: scroll on the field, or use the − / + buttons.
    • ⊡ Fit zooms to the current routine, and ⛶ Field shows the whole field again.
    • Drag empty space to pan, and double-click empty space to reset.
  • Playback: press ▶ or drag the slider to watch the robot drive the routine. The menu next to it sets the speed.

Keyboard shortcuts

Click the field once first.

Key Does
Space Play / pause
↑ / ↓ (or k / j) Previous / next point
+ / − Zoom in / out
0 Show the whole field
Esc Clear the selection
Shift + click Copy that spot's x, y to the clipboard (handy for planning new points)

6. Coordinates

The extension uses the same conventions as LemLib and path.jerry.io:

  • Positions are in inches, with (0, 0) at the centre of the field. The field runs from −72 to 72 on both axes, with +Y pointing up on the plot.
  • θ is in degrees: 0° points up (+Y), 90° points right (+X), and it increases clockwise.

7. What it understands

  • Numbers, arithmetic, #define and const / constexpr constants, local double x = …; variables, M_PI, sin, cos and similar.
  • Options in braces: {.forwards = false, .maxSpeed = 80, .minSpeed = 10, .earlyExitRange = 1, .lead = 0.3, .direction = AngularDirection::CW_CLOCKWISE}.
  • waitUntilDone(), waitUntil(distance), pros::delay(ms), cancelMotion(), and a trailing false that makes a motion wait until it finishes.
  • A comment on the line directly above a motion becomes its label, for example // grab the goal.

Not simulated:

  • if / for / while: everything inside is drawn once, in order.
  • chassis.follow(...) pure-pursuit paths.
  • Your own helper functions called from a routine.

The motion model is simple physics, so times are estimates. Each motion is drawn starting from where the previous one was told to end, the same as path.jerry.io.

8. Troubleshooting

Problem Fix
No Auton Visualizer icon in the Activity Bar Check that it's installed and enabled in the Extensions view, then run Developer: Reload Window (Ctrl+Shift+P).
"…has no LemLib routines" Open the file that contains your autons. A routine must call chassis.moveToPose, moveToPoint, turnToHeading … or setPose directly inside the function.
The plot doesn't change when I edit It updates a quarter of a second after you stop typing. If it still doesn't, click ⟳ Refresh at the top of the view.
A point won't drag Its value is calculated, such as TILE * 2. Hover it for the reason. Hold Ctrl while dragging to overwrite it with a number, or edit it in the code.
Speeds or times look wrong Tune the speeds in section 4.
A red point, or a point in the wrong place That value uses something the extension can't see, such as a function call or a variable from another file. Use a number or a const in the same file.
npm / node is not recognised Install Node.js LTS from nodejs.org, then close and reopen VS Code.
The wrong field picture Use the menu in the top-left corner of the field: Auto, Match or Skills.

9. For developers

There is no build step: it's plain JavaScript with no dependencies.

  • extension.js: the VS Code side. It runs the sidebar and editor tab, tracks the C++ file, highlights code, applies drag edits and provides the CodeLens links.
  • src/parser.js: a small C++ scanner that finds functions, statements, calls (with argument positions), comments and constants.
  • src/simulator.js: the LemLib motion models and the timeline.
  • media/main.js, media/main.css: the field drawing, dragging, zoom and popups.
  • media/field.png, media/field-skills.png: the built-in match and skills fields. Each is 500 px with the walls included; the playing field runs from px 9 to 491.
  • test/smoke.js: npm test prints what the parser and simulator see in examples/auton.cpp, or in any file you pass: node test/smoke.js path/to/auton.cpp.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft