Hi! We just installed robotpy on our robot but are now stuck on how to use the driver station with robotpy. This is our first year using python so we are very new to this. I see that there is an option for Java and C++ in the FRC driver station options but nothing for python. We want to be able to use an xbox controller to control the robot in the end. Any help will be greatly appreciated! Thanks a bunch in advance!
So all that selector does is open a dashboard for those languages. Those options don’t change the communication to the robot. So if you have code on the robot, the driver station will communicate with it.
The Driverstation will work with an X-Box controller regardless of what programming language you use.
All the C++/Java/Labview/Default selector on the Driverstation does is changes which Dashboard to display. Selecting C++/Java will open a “smartdashboad” window and display variables from your robot via network tables.
If your question is how do I use a dashboard created in python, then a workaround would be to make an exe for your python code, and replace the default exe which the drivestation calls to your python dashboard exe. This will allow the python dash to open everytime default is selecected instead of the labview based GUI which opens now.
If your question is how do I use an X-box controller on the Driverstation with the default driverstation and smartdash or the default dash, then the answer is the same way you do in any other language.
Just make sure you are reading the buttons/axis correctly in Robotpy
Hope this helps,
Thanks for the replies! We got the robot hooked up with the FRC driver station and all we have to do is deploy code tomorrow! Thanks again for the great support!
This is a great first year to use python, the documentation is significantly better this year than in previous years. For example, it actually exists this year!
Pyfrc has good deploy instructions + troubleshooting instructions if you run into problems. If you have an issue, file a bug on github and we’ll make it better.