privatefinalSendableChooser<Command>m_autoChooser=newSendableChooser<>();m_autoChooser.setDefaultOption("Do nothing",Commands.none());m_autoChooser.addOption("Name on the dashboard",command);SmartDashboard.putData("Auto",m_autoChooser);m_autoChooser.getSelected()// what the driver picked
The chooser shows up in NetworkTables as SmartDashboard/Auto. Set selected in the Sim GUI, or pick from the dropdown in a dashboard.