Go to Post We also had a couple of student leaders emerge from this offseason Rumble, which can do nothing but help the team in the upcoming FRC season. - JesseK [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-05-2016, 19:30
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: 214
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Selecting Autonomous with TI LaunchPad?

Hi,

We are going to make a nice control box with random buttons and potentiometers using the TI MSP430 LaunchPad. We want to be able to select an autonomous mode with a dial using one of the potentiometers through the LaunchPad.

The problem is, how do I send what the choice is to the robot if the LaunchPad is seen as a gamepad?

Should I write a pygame script and use pynetworktables to send the choice from it? Or is there a much simpler way that I am overlooking? How do other teams do it?

Any help would greatly be appreciated!
__________________
#Python4Life
Reply With Quote
  #2   Spotlight this post!  
Unread 12-05-2016, 19:40
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 985
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Selecting Autonomous with TI LaunchPad?

Quote:
Originally Posted by team-4480 View Post
Or is there a much simpler way that I am overlooking?
You can just read the value of the "joystick axis" that corresponds to the potentiometer analog input and use that to determine the choice.
Reply With Quote
  #3   Spotlight this post!  
Unread 12-05-2016, 19:49
asid61's Avatar
asid61 asid61 is offline
Registered User
AKA: Anand Rajamani
FRC #0115 (MVRT)
Team Role: Mechanical
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Cupertino, CA
Posts: 2,207
asid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond repute
Re: Selecting Autonomous with TI LaunchPad?

Why not simply use a multiposition button? They look like potentiometers but have different settings you can snap to rather than an analog output.
Apart from that, reading it as a joystick or just running some kind of direct voltage reading would work.
__________________
<Now accepting CAD requests and commissions>

Reply With Quote
  #4   Spotlight this post!  
Unread 09-08-2016, 23:41
Max Boord Max Boord is offline
Registered User
FRC #0179 (The Children of The Swamp), FRC #1592 (Bionic Tigers)
Team Role: Tactician
 
Join Date: Jun 2013
Rookie Year: 2002
Location: Florida
Posts: 234
Max Boord has a brilliant futureMax Boord has a brilliant futureMax Boord has a brilliant futureMax Boord has a brilliant futureMax Boord has a brilliant futureMax Boord has a brilliant futureMax Boord has a brilliant futureMax Boord has a brilliant futureMax Boord has a brilliant futureMax Boord has a brilliant futureMax Boord has a brilliant future
Re: Selecting Autonomous with TI LaunchPad?

Quote:
Originally Posted by asid61 View Post
Why not simply use a multiposition button? They look like potentiometers but have different settings you can snap to rather than an analog output.
This is how 1065 has selected auto modes for years now. 1 or 2 multi position dial and a toggle switch if needed. This year for instance we used the dial to select what we where driving over and position and then used a 3 position switch to determine if we would shoot high, low or do nothing once we got to the batter.
__________________
Past teams:
1523 (2011-2014)
1065 (2014-2016)
3932 & 4592 (2016)
Reply With Quote
  #5   Spotlight this post!  
Unread 12-05-2016, 19:53
jSchnitz's Avatar
jSchnitz jSchnitz is offline
Lead Programmer, Operator
AKA: Jacob Schnitzlein
FRC #1986 (Team Titanium)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2014
Location: Lee's Summit, MO
Posts: 18
jSchnitz is on a distinguished road
Re: Selecting Autonomous with TI LaunchPad?

Quote:
Originally Posted by RufflesRidge View Post
You can just read the value of the "joystick axis" that corresponds to the potentiometer analog input and use that to determine the choice.
It sounds like he is worried that the robot won't be able to read the joystick axis in autonomous since it is, well, autonomous. I don't actually know if this is the case or not.

NetworkTables would work just fine for sending the choice. Alternately your code could read the joystick axis in a periodic function, or in disabled, and then use the value from there in autonomous.
__________________
2016: Kansas City: Winner, Industrial Design Award. Smoky Mountains: Finalist, Engineering Inspiration Award. Archimedes Division: Winner, Industrial Design Award. FRC Dean's List Finalist
2015: Arkansas: Finalist, Quality Award. St. Louis: Winner, Industrial Design Award. Queen City: Winner, Quality Award. Carver Division: Quarterfinalist. FTC Dean's List Finalist
2014: Central Illinois: Winner, Chairman's Award. Kansas City: Winner, Innovation in Control Award. Newton Division: Semifinalist, Industrial Design Award.
Reply With Quote
  #6   Spotlight this post!  
Unread 12-05-2016, 20:03
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,068
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: Selecting Autonomous with TI LaunchPad?

At the beginning of autonomous, the FPGA latches the most recent joystick values received. So you can read joystick values in autonomous as long as you have set them properly before autonomous.
__________________
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.
Reply With Quote
  #7   Spotlight this post!  
Unread 12-05-2016, 20:06
Christopher149 Christopher149 is offline
Registered User
FRC #0857 (Superior Roboworks) FTC 10723 (SnowBots)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Houghton, MI
Posts: 1,093
Christopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond repute
Re: Selecting Autonomous with TI LaunchPad?

Quote:
Originally Posted by Thad House View Post
At the beginning of autonomous, the FPGA latches the most recent joystick values received. So you can read joystick values in autonomous as long as you have set them properly before autonomous.
This. We have 5 rocker switches that we wired to buttons 1 through 5 on the Launchpad, and just read the button states at the beginning of autonomous like a boring old joystick. Easy and simple.

(our biggest problem has been with the physical construction of our wiring to the buttons coming undone - we should redo it)
__________________
2015-present: FTC 10723 mentor
2012-present: 857 mentor
2008-2011: 857 student

2015: Industrial Design, Excellence in Engineering, District Finalist, Archimedes Division (#6 alliance captain)
2014: Judges Award, District Engineering Inspiration, District Finalist, Galileo Division

Reply With Quote
  #8   Spotlight this post!  
Unread 12-05-2016, 20:22
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: 214
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: Selecting Autonomous with TI LaunchPad?

Quote:
Originally Posted by jSchnitz View Post
It sounds like he is worried that the robot won't be able to read the joystick axis in autonomous since it is, well, autonomous. I don't actually know if this is the case or not.

NetworkTables would work just fine for sending the choice. Alternately your code could read the joystick axis in a periodic function, or in disabled, and then use the value from there in autonomous.
You hit the nail on the head. I just wasn't sure if I would be able to grab the latest value from the joystick, but it sounds like you can from the reponses. Thanks!
__________________
#Python4Life
Reply With Quote
  #9   Spotlight this post!  
Unread 13-05-2016, 00:10
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Selecting Autonomous with TI LaunchPad?

In the "old days" when the joystick values were all returned during autonomous as neutral with no buttons pressed, the typical tactic was for the user program to read and save the values while the robot was disabled before the match began, then use the saved values during autonomous. That is now done for you by the system.
Reply With Quote
  #10   Spotlight this post!  
Unread 13-05-2016, 07:15
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 79
sraque is on a distinguished road
Re: Selecting Autonomous with TI LaunchPad?

Quote:
Originally Posted by Alan Anderson View Post
In the "old days" when the joystick values were all returned during autonomous as neutral with no buttons pressed, the typical tactic was for the user program to read and save the values while the robot was disabled before the match began, then use the saved values during autonomous. That is now done for you by the system.
Is there a document somewhere that captures this, and similar, system design information?
Reply With Quote
  #11   Spotlight this post!  
Unread 13-05-2016, 09:06
messer5740's Avatar
messer5740 messer5740 is offline
Registered User
FRC #5740 (Trojanators)
Team Role: Driver
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Pittsburgh
Posts: 93
messer5740 is an unknown quantity at this point
Re: Selecting Autonomous with TI LaunchPad?

My team was considering doing this. Would the TI LaunchPad Evaluation kit work? Also, how would you make it work? Would you wire it to the RoboRio or to a different module?
__________________
A good driver is always better than a good robot.

2015: Winner of the Rookie Inspiration Award
2016: 8th seed alliance captain at Greater Pittsburgh Regional and 6th seed alliance captain at the Buckeye Regional
Thanks to all our alliance members!
Reply With Quote
  #12   Spotlight this post!  
Unread 13-05-2016, 09:11
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,692
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Selecting Autonomous with TI LaunchPad?

Quote:
Originally Posted by messer5740 View Post
My team was considering doing this. Would the TI LaunchPad Evaluation kit work? Also, how would you make it work? Would you wire it to the RoboRio or to a different module?
See this Launchpad thread to get started.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #13   Spotlight this post!  
Unread 13-05-2016, 10:27
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: Selecting Autonomous with TI LaunchPad?

If you're open to an alternative method... We set our options this year by creating custom buttons/drop boxes on the dashboard. Our drive team would configure auto as required at the setup and network tables would sent the info to the robot. This can make things a tad simpler at times (we had at least three options to set this year).
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #14   Spotlight this post!  
Unread 13-05-2016, 10:37
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: 214
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: Selecting Autonomous with TI LaunchPad?

Quote:
Originally Posted by adciv View Post
If you're open to an alternative method... We set our options this year by creating custom buttons/drop boxes on the dashboard. Our drive team would configure auto as required at the setup and network tables would sent the info to the robot. This can make things a tad simpler at times (we had at least three options to set this year).
Yea we did something similar using the SmartDashboard. Personally, I think having physical switches are awesome so we are going to give it a shot.
__________________
#Python4Life
Reply With Quote
  #15   Spotlight this post!  
Unread 13-05-2016, 12:00
GreyingJay GreyingJay is offline
Robonut
AKA: Mr. Lam
FRC #2706 (Merge Robotics)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2015
Location: Ottawa, Canada
Posts: 733
GreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond repute
Re: Selecting Autonomous with TI LaunchPad?

We put a multiposition selector switch right on the robot. It's a 12-position dial (with a nice solid click-click-click action) and a built in LED that lights up which position is selected. Internally it is a resistor ladder so you read it as an analog input on the RoboRio. Worked very well for us. The drive team literally dials in which autonomous they want to run before each match.
__________________
"If I'm going to mentor someone, I'm going to be involved in their life as a positive force." -Mechvet
Reply With Quote
Reply


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 08:54.

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