Go to Post I clicked on "agree to terms" ........ crash. I think I killed the server. ;) - rees2001 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-01-2015, 15:35
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Cool How to use driver station with RobotPy?

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!
  #2   Spotlight this post!  
Unread 15-01-2015, 16:18
Thad House Thad House is offline
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,107
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: How to use driver station with RobotPy?

Quote:
Originally Posted by team-4480 View Post
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.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
  #3   Spotlight this post!  
Unread 15-01-2015, 16:24
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
Re: How to use driver station with RobotPy?

Quote:
Originally Posted by team-4480 View Post
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
  #4   Spotlight this post!  
Unread 15-01-2015, 21:41
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: How to use driver station with RobotPy?

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!
  #5   Spotlight this post!  
Unread 15-01-2015, 23:13
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,102
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: How to use driver station with RobotPy?

Quote:
Originally Posted by team-4480 View Post
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.

http://pyfrc.readthedocs.org/en/latest/deploy.html
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:01.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi