Displaying Field Information on Driver Station

Hey CD,

Our team is starting to work on note tracking and I’m looking for a good way to display where we believe the note is located based on our feedback from Photon Vision.

Right now we’re using a Field2d object in Shuffleboard to display our robot pose. Sadly it looks like that’s solely focused on just displaying the robot pose without much else.

Does anyone know if there’s an easy to way to add points and lines to Field2d? If not, does anyone have alternatives for displaying the field, show our current robot pose, and simple shapes (lines, points, circles, etc)?

Thanks!

Requires some tedious works but you can make trajectories and then use .setTrajectory() method to display it. You’ll have to manual figure out the poses of the shapes.

1 Like

Just in case anyone stumbles on this in the future, there’s a super hacky way to get this working by copying the Field2d (and Field2dObject) code and making some slight modifications. No clue if it works with anything other than Shuffleboard. It also performs really, really, absolutely terribly so treat it as a proof of concept.

I think the real answer would be to extend Shuffleboard’s “FieldWidget” and actually put some thought into how you’re adding, retrieving, and rendering data from the network tables. But that can be for a different day.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.