If you’re using RobotPy, I’d recommend using either MagicBot (which allows using a chooser with SmartDashboard or from the FRC Dashboard) or the autonomous selector that allows you to automatically load autonomous modes from a directory. If that is the case, then you can go to “File” and click “New” to reset SmartDashboard, and at that point you should see the chooser displayed. Once you’ve updated SmartDashboard, it’s possible that the state is incorrectly cached. Make sure you have the very latest version, as the first version released this year has a bug in it. The sendable chooser will only show up in SmartDashboard. ('Choice', chooser)Īny suggestions on where to get started or insight on how to use SendableChooser? I’ve tried what was in the docs to get started, but it won’t even show up on the dashboard. Hi, my team is looking to implement multiple autonomous modes into our robot I see that the SendableChooser class can be used for this, but I am not quite sure how to use it for autonomous. Then we simply create a variable in the initialization of autonomous (before the while loop) that tells us what the selected auto is: auto = ()Īnd finally, inside the auto while loop, we simply create if statements that check what value auto is, and then place all the auto code for that auto into the if statement: if(auto = 1):Īs for it not showing up, we had a similar issue here: Īs you can see, updating the SmartDashboard.jar to the one linked there fixed the issue ![]() ![]() The way that we(1243) did it was by first initializing the entire thing in our robotInit() function: self.chooser = wp.SendableChooser() Just make sure you are calling the chooser.getSelected() method when you actually want to check for which auto is being selected. To change the team number after this: click File > Preferences to open the Preferences dialog. It looks like you have everything you need to start selecting your autos. The first time you launch the SmartDashboard you should be prompted for your team number.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |