Audio from the Driver Station

My team wants to implement Driver Station sounds to announce information to our drivers, but we don’t know where to begin. Any help would be appreciated. So far, I think the right place to begin would be the driver station itself, is there any way to actually edit the program or do I have to write a separate program to interface with the driver station?

1 Like

Im not sure what events you’ve been to, but I have enough issue talking to the drivers, let alone trying to listen to anything from crummy laptop speakers. Some digging into if you can actually hear anything while in use should be looked into long before you try and put time into programming it.

2 Likes

The Driver Station application can’t be customized, but the dashboards can be. Probably the easiest way to do what you describe is to write a plugin for Shuffleboard or modify the LabView dashboard (by creating a dashboard project) to add the feature of playing sounds based on a NetworkTables value.

Regarding utility, I know that 330 has successfully used sounds from their driver station in competition.

1 Like

Expanding a bit on this, sound was primarily used in 2016 to indicate to our driver when the turret was fully aligned and ready to shoot. It was just a simple pulse tone and fairly distinct from standard competition background noise. @Joe_Ross would know more about the technical side of things.

(I also recall it being used to indicate when a gear was picked up in 2017, but I may be confusing that with a different feature)

What information exactly do you want relayed back to drive team?

In general, rumbling the driver’s gamepad (if you’re using gamepads and not joysticks) or placing a large red/green indicator on the dashboard will likely be easier for your drivers than having them try to distinguish one sound from the cacophony that is a FRC competition.

That being said, custom LabVIEW dashboards are basically just LabVIEW programs running on your driver station laptop. There’s no reason you can’t add in there the VI(s) for playing a sound and trigger them based on a NetworkTables value. The VIs come as part of the default package; IIRC it’s in Programming > Graphics and Sound. I’ve used this before for a PR robot to play lock and unlock sounds when the robot was enabled/disabled.

If you program in Java/C++, you can still use a custom LabVIEW dashboard to read from NetworkTables. That being said, you probably don’t know much about LabVIEW programming so you probably don’t want to. My SmartDashboard and Shuffleboard knowledge is a bit more shaky, but if I’m not mistaken you would need to make your own custom widget for that. There are some threads floating around here on CD that explain how to do that.

I did this by creating a simple Java program with some WAV files in a resource folder. The Java program was ran on the driver station laptop and listened for events from the robot code.

The events were broadcasted using JeroMQ so the program on the Driver Station would receive those events and play a sound based on the text sent in that event.

1 Like

Wait, plugins are a thing for shuffleboard? I know they had to be disabled this year for smartdashboard due to some classloader issues.

Yes. See https://github.com/wpilibsuite/shuffleboard/wiki/Plugins. @SamCarlberg is available to answer questions as well.

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