FRCTeam3255 / 2024_Robot_Code

Other
4 stars 0 forks source link

Sub Preset should "just blast it" #227

Closed ACat701 closed 6 months ago

ACat701 commented 6 months ago

Our current implementation of shooting forces the drivers to wait until the robot deems itself as "ready to shoot". The conditions for being ready to shoot are very strict - which is necessary for making shots, especially from far distances - However, as we've seen in the past few days, our robot is unable to meet these conditions when we are browning out. In this case, the drivers would begin doing fender shots, but they would never be able to shoot because they don't meet the conditions; not because they will miss.

Should we implement an override for a scenario? If yes, should it override all shooting or just fender shots? @TaylerUva @Alenguye582

TaylerUva commented 6 months ago

An idea: we could look at standing voltage and decrease requirements as battery lowers. We can also look into voltage compensation.

These are just more complex ideas to get best of both worlds, but a simple override may be sufficient and easier to implement.

Related: we could reduced the requirement for pitch and rpm the closer we are (distance wise). (As it matters less)

I think any of these 3 options are acceptable

Alenguye582 commented 6 months ago

I do think a general override is the simplest solution. I think the drivers would be cautious enough to only use it when they're close enough to the speaker, so additional code checks might be unnecessary. But I think we can start with an override and if we run into problems later, we can always change it.

ACat701 commented 6 months ago

An idea: we could look at standing voltage and decrease requirements as battery lowers. We can also look into voltage compensation.

I don't really know how to implement what you're saying here; it sounds interesting though

Related: we could reduced the requirement for pitch and rpm the closer we are (distance wise). (As it matters less)

I don't like the idea of relying more on our pose than we need to, especially considering our current status on vision. As much as I think this is a more correct solution than an override, the override would only get used if we're using presets; which would only happen if vision doesn't work

A general override would be the easiest approach. My idea, just for simplicity, is that we have the subwoofer preset always ignore the conditions. The LEDs would indicate when we are up to speed, but the driver would get the visual indication that we cannot get up to speed if the LEDs don't turn on after a certain period of time (among other things)

ACat701 commented 6 months ago

I do think a general override is the simplest solution. I think the drivers would be cautious enough to only use it when they're close enough to the speaker, so additional code checks might be unnecessary. But I think we can start with an override and if we run into problems later, we can always change it.

A general override wouldn't be necessary - if we aren't getting up to speed, we would never run anything other than subwoofer

TaylerUva commented 6 months ago

An idea: we could look at standing voltage and decrease requirements as battery lowers. We can also look into voltage compensation.

I don't really know how to implement what you're saying here; it sounds interesting though

You would just get the voltage and then increase the tolerance based on how far it is away from say 12.3. Kinda defeats the purpose though. If we aren't meeting our tolerances we probably missing the shot.

Related: we could reduced the requirement for pitch and rpm the closer we are (distance wise). (As it matters less)

I don't like the idea of relying more on our pose than we need to, especially considering our current status on vision. As much as I think this is a more correct solution than an override, the override would only get used if we're using presets; which would only happen if vision doesn't work

Maybe a linear interpolation map like we do for the angle but for tolerance. This wouldn't be a fix for when pose is off, but more for giving less problems up in the podium range with a bad battery. We'd still need fall back for pose issues. This idea is more about battery fix.

A general override would be the easiest approach. My idea, just for simplicity, is that we have the subwoofer preset always ignore the conditions. The LEDs would indicate when we are up to speed, but the driver would get the visual indication that we cannot get up to speed if the LEDs don't turn on after a certain period of time (among other things)

I agree. Sub preset should just blast it and ignore RPM up to speed.

ACat701 commented 6 months ago

I think we keep our current tolerances for all shots until we see battery issues. The only change (for now) should be making the sub preset "just blast it"

ACat701 commented 6 months ago

Closed by #235