Why does shuffleboard randomly not display fields?

I keep trying to use Shuffleboard because it looks like it has so many promising options, but it is so inconsistent. Often times, even if the fields are displayed, they are disabled, when I thought they were supposed to allow for input. Other times, with the same code, many of the widgets are not displayed at all. I’ve tried re-starting Shuffleboard; playing with different preferences like auto-populate, turning off the load last layout option, etc.

I was trying to use it this time to adjust PID values for a shooter to maintain velocity. I was working from the RevRobotics examples for Velocity Closed Loop control because we’re using Sparks and Neos for our shooter. But I replaced their Smartdashboard calls with Shuffleboard, working from the Shuffleboard wpilib docs.

(Yes, I know there are PIDCommands, and PIDSubsystems, and if you put one of them on the Shuffleboard, you’re supposed to be able to tweak PID constants there, maybe if you’re in Test Mode. I’ve tried all that before as well, and never gotten it to work either. So I thought I’d try this instead.)

The first few deployments, the fields showed up fine under the Shooter tab. But when I ran the ShooterPID command, it just ran weakly for a second or two, then turned off. But at least it ran.

I was taking turns with another coder, working on another task, so we were taking turns deploying and testing our code. I don’t know if that had an impact on later issues, but I noticed fields she put on her SmartDashboard showing up on mine after I deployed, so I wondered if that meant this Shuffleboard/Smartdashboard stuff is somehow cached or saved on the rio.

Later on, the Shooter tab only had 1 field in it. I don’t remember which, maybe a button. I tried a new Shuffleboard window, no change. This is with the latest code, which is linked below.

I was probably trying to do too much here, considering I’ve struggled to do both of these (PID and Shuffleboard) before, but I don’t understand why all the fields except 1 are missing from the Shooter tab. Any suggestions?

After this, I tried putting the Shooter PID command button from RobotContainer, like the rest of our command, but it didn’t show up from that either.

Here’s the code

Disabled fields (assuming they’re still in the active code on the robot) usually means you’re not connected to network tables for some reason (check message in bottom right of the shuffleboard window). If you are connected, perhaps the log line hasn’t been hit yet (e.g. updated in some method that is called sparingly, and you haven’t enabled the robot since connecting). If you’re not connected, follow the network troubleshooting steps in the wpilib docs(check firewall, disabled extra network adapters, etc)

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