SendableChooser for Choosing between Field/Robot-Oriented Drive

Hi all,

I’m working on a command-based version of our robot code, and I was wondering what the best way to implement a chooser tab for Shuffleboard to choose between field-oriented drive and robot-oriented drive. Doing this with Autonomous is easy, because the command only runs once, but with your drive command, it needs to run continuously for the teleoperated period. Does anyone know how to implement this? Any help would be appreciated.

You would have to check periodically if the selected mode from the SendableChooser has changed. I would keep in mind having any important controls on the dashboard is a risky endeavor for competition and a toggle between robot-relative/field-relative on a controller button might be a safer option.

See this code

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.