For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set up AdvantageScope

AdvantageScope is a data visualization tool, courtesy of team 6328 Mechanical Advantage, which can visualize the swerve drive to give you feedback for debugging.

Opening

Since the 2024 season, AdvantageScope has been included with the WPILib installation. There is no external download required, but with every WPILib update you should re-download the WPILib installer to get the latest version of WPILib tools.

Configuring AdvantageScope

  1. Connect your laptop to the robot.

  2. Open AdvantageScope (WPILib), or in VS Code open the command palette and type WPILib: Start Tool, then click AdvantageScope.

  3. Click Help, then Show Preferences.

AdvantageScope's help menu
  1. Input the roboRIO IP address based on your team number: 10.TE.AM.2.

roboRIO Address field highlighted
  1. Connect to the robot (or the simulator).

Connect to Robot menu
  1. Add a new tab by clicking the + on the right side of the window.

Add new tab
  1. Add a new 🦀 Swerve tab.

Swerve tab
  1. Drag in each of these Mechanisms/swerve fields under the Sources field:

    • Mechanisms/swerve/states/current

    • Mechanisms/swerve/states/desired

    • Mechanisms/swerve/chassis/current

    • Mechanisms/swerve/chassis/desired

You may need to enable your robot before AdvantageScope shows values for these fields.

To see the robot's pose on a 2D/3D field, add a 2D Field or 3D Field tab instead and drag in Mechanisms/swerve/pose.

Reading the display

The RED lines are the measured velocity and position of each swerve module.

The BLUE lines are the velocity and position each module was commanded to.

Large, persistent gaps between the red and blue lines usually point to a tuning issue — see how to tune PIDF gains and swerve drive drift causes.

Last updated

Was this helpful?