VingVing Robot LogoVingVing Robot

Documentation v0.0.3

VingVing Robot Docs

Dashboard

Real-time robot visualization and debugging with FTC Dashboard and Panels

FTC Dashboard

Real-time telemetry, graphs, and field visualization from your web browser

Panels Field

Draw robot paths, poses, and debug information on a visual field

FTC Dashboard Setup

Installation

Add FTC Dashboard to your project dependencies:

TeamCode/build.gradle
dependencies {
    implementation 'com.acmerobotics.dashboard:dashboard:0.4.12'
}

Accessing the Dashboard

Once installed, connect to your robot's WiFi and navigate to:

http://192.168.43.1:8080/dash

If your Control Hub uses a different IP (like 192.168.49.1), use that instead.

Panels Field Integration

VingVing Robot includes built-in Panels Field support for visual debugging.

Drawing Robot Position

Drawing.java
import com.bylazar.field.FieldManager;
import com.bylazar.field.PanelsField;
import com.bylazar.field.Style;

public class Drawing {
    private static final FieldManager panelsField = PanelsField.INSTANCE.getField();
    private static final Style robotStyle = new Style("", "#3F51B5", 0.75);

    public static void init() {
        // Set up VingVing offsets
        panelsField.setOffsets(PanelsField.INSTANCE.getPresets().getVINGVING_ROBOT());
    }

    public static void drawRobot(Pose pose) {
        panelsField.setStyle(robotStyle);
        panelsField.moveCursor(pose.getX(), pose.getY());
        panelsField.circle(9); // Robot radius

        // Draw heading indicator
        Vector v = pose.getHeadingAsUnitVector();
        v.setMagnitude(9);
        panelsField.line(
            pose.getX() + v.getXComponent(),
            pose.getY() + v.getYComponent()
        );
    }

    public static void sendPacket() {
        panelsField.update();
    }
}

Drawing Paths

// Draw a path on the field
public static void drawPath(Path path, Style style) {
    double[][] points = path.getPanelsDrawingPoints();

    panelsField.setStyle(style);
    panelsField.moveCursor(points[0][0], points[0][1]);
    panelsField.line(points[1][0], points[1][1]);
}

// Draw entire path chain
public static void drawPath(PathChain pathChain, Style style) {
    for (int i = 0; i < pathChain.size(); i++) {
        drawPath(pathChain.getPath(i), style);
    }
}

Using Dashboard in OpModes

MyAutonomous.java
package org.firstinspires.ftc.teamcode;

import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.vingvingrobot.follower.Follower;
import com.vingvingrobot.geometry.Pose;

@Autonomous(name = "Dashboard Example")
public class MyAutonomous extends LinearOpMode {
    private Follower follower;

    @Override
    public void runOpMode() {
        // Initialize follower
        follower = RobotConfig.createFollower(hardwareMap);
        follower.setStartingPose(new Pose(0, 0, 0));

        // Initialize drawing
        Drawing.init();

        waitForStart();

        while (opModeIsActive()) {
            // Update robot
            follower.update();

            // Draw on dashboard
            Drawing.drawRobot(follower.getPose());
            Drawing.drawPath(follower.getCurrentPath(), pathStyle);
            Drawing.sendPacket();

            // Telemetry
            telemetry.addData("X", follower.getPose().getX());
            telemetry.addData("Y", follower.getPose().getY());
            telemetry.addData("Heading", Math.toDegrees(follower.getPose().getHeading()));
            telemetry.update();
        }
    }
}

Dashboard Features

Field View

  • Visualize robot position and heading in real-time
  • See planned paths and actual trajectory
  • Draw custom shapes and debug information

Telemetry

  • Live graphs of position, velocity, and error
  • Monitor PID output and motor powers
  • Track performance metrics in real-time

Configuration

  • Adjust PID values on-the-fly without redeploying
  • Modify path constraints in real-time
  • Test different configurations quickly

OpMode Control

  • Start and stop OpModes from the dashboard
  • Switch between different test modes
  • Access camera streams for vision debugging

Debugging Tips

💡 Use Color Coding

Draw different elements in different colors: robot in blue, target path in green, actual trajectory in red. This makes it easy to spot deviations.

💡 Draw Error Vectors

Visualize position and heading errors as arrows from the robot to the target. Helps identify which PID controller needs tuning.

💡 Track Pose History

Draw a trail showing where the robot has been. Perfect for identifying drift or localization issues.

Next Steps

Now that you have dashboard visualization set up, start tuning your robot!