gamemanual0 / gm0

Game Manual 0 - The most extensive guide out there for FTC
https://gm0.org
Other
54 stars 92 forks source link

Add gravity-compensated kinematic equations and feedback control #419

Closed KennanHunter closed 2 months ago

KennanHunter commented 9 months ago

Also added a line to the readme about downloading sphinx-autobuild, as it's not included in the requirements.txt.

367

abidingabi commented 9 months ago

Anything regarding sphinx-autobuild should be a different PR, I’m not sure that putting that in the README is the right solution. I see two reasonable solutions, export requirements.txt including dev dependencies, or making two requirements.txt exports; the former is more straightforward at a very slight cost to CI pipelines which I think would be acceptable.

KennanHunter commented 9 months ago

@abidingabi are there any other changes you wish to see?

KennanHunter commented 9 months ago

@abidingabi are there any other changes you wish to see?

KennanHunter commented 9 months ago

in general I think it would make sense to switch to a coordinate system where 0 degrees is horizontal, as this follows more closely with other sources (e.g. Controls Engineering in FRC, CTRL ALT FTC, etc.).

If this is a non-negotiable then I'll definitely change it, but I feel like having 0 as vertical is more intuitive, especially for newer teams. I've seen plenty of robots this season that use systems like 11329 (and other teams) last year where there's a big arm that passes over the robot (kookybotz is a pretty good example), and I think that the symmetry there makes sense. Negative angle -> positive power to correct, positive angle -> negative power to correct.

I do get that there are many arms that benefit from gravity compensation that don't have a range of motion that goes over the vertical, which might be the reasoning behind using 0 as the horizontal, but it doesn't parse as well in my head.

I tried to emphasize that the frame of reference is up to the user and that they should learn the trigonometry to figure out whatever math they need, but it's hard to convey that in the tutorial-esque style.

abidingabi commented 9 months ago

Making our content make sense in the context of existing resources is important, as while the choice of coordinate system may be confusing, it may be more confusing to go to a different resource and see a “completely different” equation being used for the same thing. I do agree there is a nice symmetry argument to be made about 0 as the vertical, but 0 as the vertical also breaks some intuition from those who are used to thinking about 0 degrees as the positive x-axis from various math classes. Choice of coordinate system will always be a somewhat contentious topic, but I think it is generally better to go with the conventions being used in the space if it isn’t particularly inconvenient to do so, and this seems like one of those cases.

abidingabi commented 2 months ago

I am closing this because nothing has changed in 7 months, feel free to reopen the PR once review comments are addressed.