FRC5549Robotics / 5549-2020

FRC Team 5549's 2019-2020 Robot Code
2 stars 2 forks source link

Function to Shoot into Inner Port #13

Open dylantknguyen opened 4 years ago

dylantknguyen commented 4 years ago

This function should be able to shoot the ball into the inner port when the bot is on the initiation line closest to the inner port. This would be later integrated into the autonomous code.

tulser commented 4 years ago

The function for the velocity of the shooter over the parameter d (distance on a plane parallel to the floor) will resemble:

v(d, h) = sqrt[(gd^2)/(h-d)]

Where g is gravity and h is height of the target. The height of the center of the receptacle from the ground is 2.49555 meters. The diameter of the ball is 0.1778 meters and its radius 0.0889‬ meters. The bounds of the receptacle are +/- 0.381 meters from the center, 2.87655‬ meters max & 2.11455‬ meters minimum. The bounds for the ball's center is then 2.87655-0.0889 = 2.78765‬ meters max & 2.11455+0.0889 = 2.20345‬ meters min.

Some points of the above are just notes for myself, particularly for uncertainty calcs.

tulser commented 4 years ago

https://www.desmos.com/calculator/kxsllgwg9d Here are the models visualized including percent/relative error. I don't know if Ethan wants to see this or not but it might be interesting.