Alliance provided by FMS?

We are using a color sensor to sense ball color on intake. One of the ideas we considered was to have a second sensor pointing at the bumper material to “auto” identify what alliance we were on. I can’t remember if this data is provided to us by the FMS system during a match. Anyone else know for certain?

In 2018 it was, but I’m unsure about other years.

Another option could be a button on your dashboard to pick alliance color (and/or ball-related behavior), but that’s subject to human error

Yes it is, i know for a fact that in labview there is a WPIlib VI that returns the match data

Exactly. I wish it was easy to run two rev color sensors, then I wouldn’t have to ask.

I’m aware of the Labview VI, I’m just not 100% certain it gets populated with the red or blue data, and finding out at competition is a little late.

Driver station has (at least in past seasons) an option to change which station is broadcast to the robot, so that ought to work for testing off-field. When you’re on the field, this sort of data usually still comes directly from the DS - FMS just controls the DS state. Judging by where these methods live in Java and C++, I suspect that’s the case here too.

FRC Driver Station Powered by NI LabVIEW — FIRST Robotics Competition documentation has a screenshot - it’s from 2015, but I don’t think the layout has changed much since then. (7) is the option I’m referring to.

There is a table on NetworkTables called FMSInfo which contains an entry called IsRedAlliance. This is a boolean signaling the current alliance. When running the robot not connected to FMS it defaults to true.

1 Like

Yes, the methods in the DriverStation class contain the alliance color. It’s actually the exact station you’re in. That data is part of the control packets, so it will be reliable during the match. If you want to test it, you can just use the drop-down on the DS to select your station.

The networktable mentioned above is just created from that data when received in your robot program. In your program, just use the DS API directly.

Alliance (red/blue), Driver Station (1/2/3), Match number are provided by FMS.
Some of that gets recorded in the Driver Station log, so you can look up an old log from a past competition to see what’s in there (title is bolded w/match number for FMS controlled matches).

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