Vision in FIRST Power Up

So I know everyone was in a frenzy, as someone who really likes vision systems, it feels like there is a lack of vision opportunity in this game. Other than maybe the reflective tape on the scale for lining up?

Maybe I am just not that creative other

Here’s one possiblity. Two years ago (Stronghold) the red/blue lights (like those found in PowerUp on each end of the switches and the scale) were detectable due to their color and their linearity. This a more difficult vision-processing software task than using retro-reflective tape - but could be possibly used for things including alignment with the plates and also auto-detection of which team has current ownership.

Do you have any examples of teams doing that?

Thats incredible though, I was thinking maybe something like that, could help lineup your robot

If not for vision, how else do we detect the colors on the scale during autonomous mode (since they’re randomized)? ::rtm::

The FMS data provided For the 2020 season software documentation has been moved to https://docs.wpilib.org. Documentation for KOP items can still be found here. | FRC KOP Documentation

Here’s a link to some vision code from Stronghold:

See the process_tower_lights function.

The only difference this season is horizontal vs vertical lights.

Interesting. The manual says it’s provided to the operator console. This says that it’s also provided to the robot.

One result: auto routines that depend solely on timing (forward at 50% for 5 seconds, turn left, forward for 3, dump the power cell) are going to be a mistake – you might end up dropping your cell on the wrong side of the switch.

C

My only thought about vision this year is that I cannot even begin to imagine how one will do a multi-cube auto without cube recognition. Sure, they’re in roughly the same spot every match, but I would think it’d be miles easier if you were able to just detect a cube…

That’s what I was worried about at first, but if you are able to take your starting position and compare that to whatever the FMS data is, then you can have different paths for your robot to take depending on where it “figures out” it’s starting from (think of using an if statement or a switch statement in the disabled method). Instead of having forward “forward at 50% for 5 seconds, turn left, forward for 3, dump the power cell”, you might want to have


if(startingPosition == Red3 && switchPlateOwned == right) {
  forward at 50% for 5 seconds, turn left, forward for 3, dump the power cell
}else if(startingPosition == Red1 && switchPlateOwned == left) {
  forward at 50% for 5 seconds, turn right, forward for 3, dump the power cell
}

I hope that pseudocode makes sense and is able to help you. You are in fact, in the same way that you can get the FMS data, able to get the alliance/station number you are positioned at, unless you change your robot’s position.

Good point, although that’s not super helpful since usually robot starting positions are determined (mostly) independently of your station.

True, but if neither alliance wants to switch around their positions, it would still apply. If not, your alliance can always pre-determine where you want to start from and you can set up a sendable chooser to manually select which station you’ll be starting from during the queue for the match.