Go to Post But their robot puts its wheels on one at a time just like ours, so we can be a HOF winner too! - Foster [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 25-01-2014, 14:44
faulknna faulknna is offline
Registered User
FRC #0435
 
Join Date: Jan 2014
Location: North Carolina
Posts: 4
faulknna is an unknown quantity at this point
Detecting If We're Competing

Does anyone know of a way to detect if we're at competition? I'm trying to implement a battery-saving mechanism on the driver station that will beep at you (kind of like an alarm clock) after 3 seconds of being below 11 volts, and will disable the robot after 13 seconds; however, I need to make sure the robot doesn't get shut down in the middle of a match. While a simple solution might be to have a control on the dash board, I'd rather have something that can't be so easily flipped.
  #2   Spotlight this post!  
Unread 25-01-2014, 15:13
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,600
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Detecting If We're Competing

Java and C++ have a method in the DriverStation class called isFMSAttached.

You may want to experiment with your thresholds once you have the robot built.
  #3   Spotlight this post!  
Unread 25-01-2014, 15:38
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 116
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
Re: Detecting If We're Competing

One small addendum - I would be very, very careful with any code that disables your robot. A bug, misconfiguration, or regression in that could could have the undesirable side effect of disabling your robot at competition.
  #4   Spotlight this post!  
Unread 26-01-2014, 08:52
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Detecting If We're Competing

I wasn't sure what language. It doesn't look like LV exposes that in a palette VI, but it is easy to get from one of the lower level VIs not in the palette.

But before doing this, does the robot use that much more power when enabled than when disabled? Is it the compressor? Because it may be simpler to have a toggle for energy saving that is more explicit. Binding this to being on a field could happen later, but it will in fact be hard to test before you are at an event.

Greg McKaskle
  #5   Spotlight this post!  
Unread 26-01-2014, 09:38
magnets's Avatar
magnets magnets is offline
Registered User
no team
 
Join Date: Jun 2013
Rookie Year: 2012
Location: United States
Posts: 748
magnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond repute
Re: Detecting If We're Competing

IIRC, isFMSAttached didn't work last year.
  #6   Spotlight this post!  
Unread 27-01-2014, 00:09
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Detecting If We're Competing

Just have a checkbox, with it's value saved. That way, whenever you go to comps, you just need to press the comp checkbutton once and you're set. It's not too hard either!
  #7   Spotlight this post!  
Unread 27-01-2014, 00:28
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,825
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: Detecting If We're Competing

Quote:
Originally Posted by yash101 View Post
Just have a checkbox, with it's value saved. That way, whenever you go to comps, you just need to press the comp checkbutton once and you're set. It's not too hard either!
What about the practice field?
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

  #8   Spotlight this post!  
Unread 27-01-2014, 11:01
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Detecting If We're Competing

TL;DR: Set a flag in your autonomous routine, only triggered when you are playing a real game or during "practice" on driver station.


We are going to be doing something different on the real field then at our pits with one of presets on the robot we are building and I had a similar problem.

I will tell you how I plan to only allow a preset when we are in the pits versus during the actual game and you can see if it applies for you.

Basically, we use IterativeRobot in Java and C++ and we are setting a flag during the autonomous portion. While that flag is tripped, then we are in a real game and as such I do not want to return to our start position of the robot. When it is not tripped, that means we just flipped the driver station to teleop and are playing around in the pit and I will allow the robot to be returned to start position automatically then.
  #9   Spotlight this post!  
Unread 27-01-2014, 11:16
chris.boyle's Avatar
chris.boyle chris.boyle is offline
Programming Mentor
FRC #0068 (Truck Town Thunder)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Truck Town Thunder (Brandon)
Posts: 36
chris.boyle is on a distinguished road
Re: Detecting If We're Competing

I have asked this question in the past and the answers I received are in the following thread. http://www.chiefdelphi.com/forums/sh...d.php?t=114614

Also, I've attached a photo of how we are using the information.
Attached Thumbnails
Click image for larger version

Name:	FMSConnected.png
Views:	48
Size:	2.7 KB
ID:	15979  
__________________
2014 Chairman's Award--Michigan State Championship
2014 Chairman's Award--Waterford District
2014 Winner--Great Lakes Bay District
2013 Chairman's Award--Kettering District
2012 Championship Division Finalists--Thanks 330 and 639
  #10   Spotlight this post!  
Unread 27-01-2014, 11:48
JesseK's Avatar
JesseK JesseK is offline
Expert Flybot Crasher
FRC #1885 (ILITE)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2005
Location: Reston, VA
Posts: 3,722
JesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond repute
Re: Detecting If We're Competing

We have a similar situation where we want to automatically up the data rate of telemetry data from the robot to the driver's station when not on a competition field. If the cRIO can keep up, we're talking roughly 2Mbits on top of video & normal FMS traffic, so we really want to scale it back on the field.

Can anyone confirm that the FMS Attachment bit still works? Does it detect the actual FMS & FMS Lite?
__________________

Drive Coach, 1885 (2007-present)
CAD Library Updated 5/1/16 - 2016 Curie/Carver Industrial Design Winner
GitHub
  #11   Spotlight this post!  
Unread 27-01-2014, 17:27
magnets's Avatar
magnets magnets is offline
Registered User
no team
 
Join Date: Jun 2013
Rookie Year: 2012
Location: United States
Posts: 748
magnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond repute
Re: Detecting If We're Competing

After looking at our code from last year, the FMS method did not work during the match we tried it at.
  #12   Spotlight this post!  
Unread 27-01-2014, 19:39
bs7280 bs7280 is offline
Registered User
FRC #3734
Team Role: Leadership
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Lake Forest
Posts: 80
bs7280 has a spectacular aura aboutbs7280 has a spectacular aura aboutbs7280 has a spectacular aura about
Re: Detecting If We're Competing

Make it so that no matter what the battery level is, the power can not be cut until at least 2 and a half minutes have passed (I would do three just to be safe), then once 2.5 minutes have passed, the program can cut off power after 11 volts
  #13   Spotlight this post!  
Unread 27-01-2014, 20:33
matthewdenny's Avatar
matthewdenny matthewdenny is offline
Registered User
FRC #6054 (Dukes)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: United States
Posts: 313
matthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant future
The solutions proposed so far are elegant and seem effective. However I suggest 1 more possible option. You could have a simple switch wired to a digital input. The default position (as well as the switch unplugged position) would be competition settings and the other option could be for testing.
  #14   Spotlight this post!  
Unread 28-01-2014, 07:40
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Detecting If We're Competing

I believe that the bit in the protocol is set, but I can't really verify that the bit makes it to the control byte unmodified. Anytime the FMS Present message and blue strip shows on the DS, that will trigger the FMS bit. So this should work with FMS lite.

Greg McKaskle
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 02:38.

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