Skip to content
Tempo on GitHub (opens in a new tab)

3.24 AdvantageScope

AdvantageScope can draw Tempo’s planned path over the robot’s pose on its 2D field.

Copy the AdvantageKit sink into your project and add this line once, after Tempo.configure(...):

Java
import com.tempo.logging.TempoLogging;

TempoLogging.everything("Tempo", new AdvantageKitSink()).apply();

AdvantageKit records the keys under RealOutputs/Tempo/ (ReplayOutputs/Tempo/ in a replay). Without AdvantageKit, pass the NetworkTables sink the same way. Its keys are under NT:/Tempo/, as in the figure.

Copy the NetworkTables sink into your project and pass it to everything with the Tempo prefix once, after Tempo.configure(...).

Python
from tempo.logging import TempoLogging

# network_tables_sink is the NetworkTables sink copied from Log Tempo state.
TempoLogging.everything("Tempo", network_tables_sink).apply()

The call is tempo::wpi::TempoLogging::everything("Tempo", std::make_shared<NetworkTablesSink>()).apply().

The keys are under NT:/Tempo/ in AdvantageScope.

AdvantageScope's 2D Field tab on the 2025 field, with NT:/Tempo/Path shown as a trajectory and NT:/Tempo/Pose as the robot
Tempo/Path as a trajectory and Tempo/Pose as the robot, read from NetworkTables. View full size (opens in a new tab) ↗

Keys

The full list is in TempoLogging.

  • Tempo/Path (Pose2d[]) is the planned trajectory, sent on the first loop of a run and again each time the plan changes.
  • Tempo/Pose (Pose2d) is the pose Tempo read this loop, and it’s only logged while a route runs.
  • Tempo/PlannedPose (Pose2d) is where the plan expects the robot to be this loop.
  • Tempo/Target (Pose2d) is the target of the current leg.
  • Tempo/Zones/0, Tempo/Zones/1 and so on (Pose2d[]) are closed outlines of what the current leg plans around.

Field view

  1. Connect AdvantageScope to the robot or the simulator, or open a log file.
  2. Open the 2D Field tab and pick the field image for the game pack you’re using.
  3. Drag Tempo/Path onto the field and show it as a trajectory.
  4. Drag Tempo/Pose onto the field as a robot. You can use the drivetrain’s own odometry key instead, and that one keeps logging after the route ends.

Tempo/Path keeps its last value until the next plan, so the field still shows the last route after an auto ends.

Planned and actual pose

Add Tempo/PlannedPose as a ghost robot. The distance between it and Tempo/Pose is the tracking error, and it’s also logged as Tempo/Error/X and Tempo/Error/Y, in meters, in the robot frame.

To compare commanded and planned speed, plot Tempo/Speeds/Vx and Tempo/PlannedSpeeds/Vx on a line graph.

Zones

Add Tempo/Zones/0 and the keys after it as trajectories. They draw the obstacles (the pack’s and the route’s own), avoid zones, keep-in regions and terrain that the current leg plans around. Tempo/Zones/Names lists them in the same order, each as kind:name.

If it fails…

Tempo/Path never fills Failure handling →

No leg could be planned, so no path was sent. Check Tempo/GiveUps/Cause.

No Tempo keys show up Log Tempo state →

No sink was installed, or it was installed after the route started. apply() only affects routes that start after it.

Download Logs finds nothing on the roboRIO Log Tempo state →

Without a USB stick, DataLogManager writes to /home/lvuser/logs. Set AdvantageScope’s roboRIO log folder to that, or plug in a USB stick.

esc

Loading search...