EZ-Robotics / EZ-Template

Simple plug-and-play PROS template that handles drive base functions for VEX robots.
https://ez-robotics.github.io/EZ-Template/
Mozilla Public License 2.0
67 stars 28 forks source link

Multiple IMU Support #139

Open ssejrog opened 1 month ago

ssejrog commented 1 month ago

Is your feature request related to a problem? Please describe.

As EZ-Template relies on the IMU, if it ever disconnects or causes problems, you are screwed.

Describe the solution you'd like

Allowing multiple IMUs fully for redundancy seems like a positive thing. It needs to be decided if these multiple IMUs will be averaged, if it'll iterate between all of them, how IMU scaling will work, how to handle disconnecting (if we continue to read an IMU after it reconnects), there is probably more too.

Describe alternatives you've considered

Track width could be used when IMU fails, but I don't like this solution because it requires tuning track width. Multiple IMUs would benefit from all being scaled correctly, but I don't think it's required. Good results with track width require tuning, which means figuring out a way to make this easy and approachable. Ultimately I believe this would become a more complex solution.

Additional context

BLRS2 used double IMUs on their 24" and won worlds. It must be good.

Brody9185 commented 4 weeks ago

Not entirely sure if this was included with the idea, but based on the BLRS2 reference it seems like it was. But on top of the quick swap if one disconnects It would be cool to see where both are used for more accuracy and then if one fails then it swaps to just one.

ssejrog commented 4 weeks ago

So you'd want some way of logging when this event happens and make it clear to a user? Maybe it could be as simple as changing the background color on the brain screen