|
Re: How to use driver station with RobotPy?
Quote:
Originally Posted by team-4480
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!
|
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,
Kevin
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
|