MARSProgramming / M15

This repo houses the code for MARVIN XV which plays the 2022 FRC game Rapid React
2 stars 0 forks source link

Advanced Shooter Behavior #6

Open WVGman opened 2 years ago

WVGman commented 2 years ago

This is gonna be a toughie, how do we get the ball to the upper goal? Once again, Pratham, Shawn, and Kenneth have some theoretical equations (and so does Andrew/Ryan) for this problem, but there are a few things we need to get right before this happens. We need to somehow accurately know what angle the ball will release from the robot based on the cowl angle and the flywheel speed, which is not as linear as one would hope (or at least, it wasn't on M14). An idea I had for this was to use something like this (https://markrober.store/products/40mph-speed-square-blanket) to record data (like in slow motion video) about the ball's trajectory based on cowl and flywheel speed, then create a table or hopefully a nice equation to find the ball's angle. While this is technically empirical, it would be actual data instead of just guess and check, and could give something genuinely useful. Of course, we also need to accurately know the distance from the target for this to be useful information.

I wouldn't want to do this, but if this is inaccurate enough, we might have to do the good ol' look-up table converting from distance to cowl angle and flywheel speed based on empirical testing. I would love to actually have some sort of sophisticated approach to this, because this would allow for much easier shooting while moving implementation, but this is a very real possibility.