Skip to content

Action Tracing

Actions are the core execution primitive in Volt — reusable units of robot behavior with init, loop, and cleanup stages. They originate from RoadRunner and are extended by Volt with tracing and composition.

By default, Volt traces all Actions added to a VoltActionBuilder. These traces are helpful when debugging and analyzing action flows.

Start then {
+robot.drivetrain.path { lineTo(endPose) } // Action is traced as "Action"
instant { blackboard["endPose"] = robot.drivetrain.pose } // Action is traced as "Instant"
}

The TracedAction class wraps RoadRunner’s Action class. It injects code in the Action’s run logic to keep track of:

  1. When the Action begins
  2. When the Action finishes
  3. How long the Action was running

The class also takes a label that can be used to identify the encapsulated Action.

All Actions added to a VoltActionBuilder are automatically traced using TracedAction.

The ActionTracer handles all TracedActions. It has methods to mark Actions as running or completed, as well as to display telemetry on the Driver Station and add the entire trace to a telemetry packet.

The ActionTracer’s writeTelemetry method displays all running Actions and their elapsed time in milliseconds.

An output might look like this:

=== Running Actions ===
[0] Action (202ms)

If there are no running Actions the output will look like this:

=== Running Actions ===
None

The action trace lists the previous 100 actions stored by the ActionTracer. It is automatically displayed on FTC Dashboard.

An output might look like this:

action/0/Action 202