Shuffleboard items not appearing

Stumped. Using the following code:

SmartDashboard.putNumber(“SanityCheck”, 1234);

results in…nothing. I’ve used these commands with Shuffleboard for two years and suddenly they’re doing nothing.

I just installed the 2020 development system, reprogrammed the RoboRIO, the radio, the TalonSRX controllers, created a new basic robot project, can write code in Visual Studio Code and deploy it to the robot remotely, run it, and drive it.

CameraServer works. FMS items appear in the Shuffleboard left-side menus. I can save/load layouts. But nothing that I try to add to the dashboard from within the code works at all. Nothing shows up in the network tables in Shuffleboard, in the default dashboard, or anywhere else. I can’t check the RIO directly because the browser interface no longer supports that.

No errors appear in the logs. The dashboard .update() functions run, report the ms taken, and show no problems. This happens on two different entirely separate development stations, with two separate RoboRIO setups.

I can’t seem to find anything indicating that there are further prerequisites or initialization required. And again, it’s worked for the last two years.

Any ideas about what could cause Smartdashboard put commands not to publish data to the network tables, or is there something else I could be missing?

Did you set the team number in Shuffleboard’s NetworkTables preferences? Does Shuffleboard say “NetworkTables: connected” in the lower right hand corner? Try using OutlineViewer–does the variable show up there? Where in your code did you put the putNumber()?

I’ll try the outlineviewer and check the status bar, but remember, it’s not a problem limited to Shuffleboard. If I browse the network tables even in the driver station default dashboard, I can see everything in the network tables; the camera server data, the FMS info, etc. but no dashboard items. SanityCheck remains absent from every possible method I’ve used to look for it.

The “putnumber” is in one of the periodic functions, and I’ve even hooked it to a joystick button control and done it in the same scope as a control function, such as a PCS solenoid. I press a button, the solenoid moves, but nothing appears on the dashboard or network tables. So I know for a fact that the line of code is running on a drive station/robot that is otherwise working perfectly.

I’m a mentor, incidentally. 30+ years of programming experience, three years mentoring 6933. But even I can get stumped by some significant rabbit holes in this dev environment by failing to cross an i or dot a t I didn’t know existed.

Can you share or link to your code?

We had a similar problem at our meeting today. ShuffleBoard values had been working, and then some stopped appearing (that part of code had not changed). We had 4 SmartDashboard.putString() in Robot init(), but only one of them showed up. Even scrolling through the network tables list on the side of the ShuffleBoard 3 of the values were not present. After redeploying our code (with no change) and turning the robot on and off again all values showed up and functioned fine.

The issue has not happened since and we still do not know the cause. I think it may have something to do with the robot getting emergency stopped on accident before it stopped working. We had pressed the reset on the RoboRIO but not fully powered it off. Maybe this screwed up NetworkTables?

I suspect you did not have “Network Tables Connected” in the bottom right of the shuffleboard window and were seeing outdated entries listed. Network Tables is a distributed datastore, so if Shuffleboard hasn’t been restarted since losing the connection, it will maintain it’s old state. Rebooting the robot (and/or redeploying code) likely re-established the connection and allowed Shuffleboard to receive the updated data.

I experienced this exact behavior during my team’s meeting today, and the redeploy/reboot steps worked for us as well. I didn’t attempt to troubleshoot beyond that, however.

Thanks

Update: Got everything working. Unfortunately, I have no idea how.

That’s because I had a Clark Griswold moment. I tried everything suggested: rebooting, re-deploying code, resetting the RoboRIO, triple-checking all of the places the team number had to be entered, checking all of the communications statuses, checking all the wiring… still no sign of the values on Shuffleboard.

Then I looked at the drive station and thought…wait a minute…when did that get set to “test” mode?

Set it back to tele-op and the Shuffleboard commands worked fine. Argh! So I have no idea which of the things I tried above was the factor that got it to work. And that definitely wasn’t the problem earlier yesterday when we were testing and trying to get data during a teleop procedure that was also driving the robot. Mysterious.

But let me leave with one last nitpicky detail question. Last year, using “.put” commands to the dashboard caused the items to appear immediately. Some time during the summer when starting code for a demo bot, for some reason they were not appearing automatically, and instead I had to open the network tables interface on the left, scroll down to find the item, and drag/drop it do the display area in order to see it. And even then, it had a “dashboardname/itemname” path in it and I had to edit that to make it readable (I forget the exact path.)

Is there some setting/procedure that creates that distinction between elements that appear automatically and elements that must be explicitly dragged over?

We are using putData and putNumber frequently, and our values show up immediately in Shuffleboard.

1 Like

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