-
Notifications
You must be signed in to change notification settings - Fork 1
Field2d
Carson Rueter edited this page Jan 24, 2025
·
3 revisions
The Field2d widget displays your robot's position on the field.
To show your field on the dashboard, you must first send a Field2d object to the dashboard from your drivetrain:
Field2d m_field = new Field2d();
// ...
m_field.setRobotPose(m_odometry.getPoseMeters());
SmartDashboard.putData(m_field);
This will put the field object under /SmartDashboard/Field2d
. Drag that widget onto your tab to show the field.
- Title Font Size: The font size of the title text.
- Robot Shape: One of Robot (rectangle with triangle), simple filled rectangle, or simple filled circle (useful for game pieces/points)
- Robot Color: The color of the outline/fill of the robot/object.
- Robot Width/Length: The width & length, in meters, of your robot or object (incl. bumpers).
- Use Vertical Field: Set to true to show the field vertically a la the driver's perspective.
- Mirror for Red: Set to true to mirror the field when on the red alliance. This is useful for improving perspective.
- Field Type: What field to use, e.g. 2025 or 2024.
- Topic: What NetworkTables topic to use.