Shuffleboard Field2D

I am trying to learn to do robot pose detection using a limelight. I can get values from the limelight, but would like to visualize the pose on a Field2D widget on the shuffleboard. I can get the robot to show its position, but it does not update live if the camera is moved. It will update if I redeploy the code. If I use Glass the robot position updates live.

I can see that the Field X, Y, and Rot values are changing, but the image of the robot stays stationary when the camera is moved.

Is this a limitation of the Field 2d widget in Shuffleboard, or do I have an error in my code?

Link to code
LHSPantherbots/AprilTagPoseTest (github.com)

I am updating the field2d pose in the periodic function in the exampleSubsystem.java file.

1 Like

If I remember correctly, I don’t think you have to run

SmartDashboard.putData(“field”, m_field);

periodically. I think you just call this once, then do setRobotPose periodically.

When I run the SimpleDifferentialDriveSimulation example, the robot moves as expected in both the simulator and in Shuffleboard.

Shuffleboard has an issue that looks something like this: the values update in the side column but not the dashboard visuals. Restart Shuffleboard and try again.

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