Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Any Team Using A Timer? (http://www.chiefdelphi.com/forums/showthread.php?t=90556)

davidthefat 30-01-2011 21:37

Any Team Using A Timer?
 
Any of you guys using the timer to make sure that the driver does not "jump the gun" with the minibot deployment? Now the minibot scoring will ultimately come down to the milliseconds. My only worry with this is that the software might not allow the driver to deploy on time. If I allow the minibot to be deployed a little earlier, it defeats the purpose of the timer in the first place; the driver might jump the gun.

mwtidd 30-01-2011 21:58

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by davidthefat (Post 1012068)
Any of you guys using the timer to make sure that the driver does not "jump the gun" with the minibot deployment? Now the minibot scoring will ultimately come down to the milliseconds. My only worry with this is that the software might not allow the driver to deploy on time. If I allow the minibot to be deployed a little earlier, it defeats the purpose of the timer in the first place; the driver might jump the gun.

One thing to note is the robots perception of time, and the actual field time tends to differ. Trying to get it as exact as you are inferring will most likely be difficult. I think in the end the driver's perception of match time will be better than the robots. Rather than putting it on a timer, consider using a color sensor or camera to watch the color on the tower base and use that as the indicator.

MagiChau 30-01-2011 22:01

Re: Any Team Using A Timer?
 
I heard that sometimes the total match time varies. This is going to throw off your onboard timer. I would rather have the drivers train than program this feature.

davidthefat 30-01-2011 22:04

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by lineskier (Post 1012081)
One thing to note is the robots perception of time, and the actual field time tends to differ. Trying to get it as exact as you are inferring will most likely be difficult. I think in the end the driver's perception of match time will be better than the robots. Rather than putting it on a timer, consider using a color sensor or camera to watch the color on the tower base and use that as the indicator.

My initial choice was to use a camera, but I then realized that due to the configuration of the robot and the chassis, it would be very hard for the camera to actually see the base of the towers. Essentially, no one had taken a serious consideration of that idea when I proposed it several times during the first few days after kickoff... So even the sensors are second rate components for the team. I find it very hard to incorporate the lintrackers to our current chassis...

apalrd 30-01-2011 22:07

Re: Any Team Using A Timer?
 
The onboard timer is not tied directly to the FMS, but it counts beginning with the first enabled packet, which is pretty close. You will probably be more accurate than a human, and your match time will probably lag about 100ms max or so behind FMS. You could compensate for this or leave it, your choice. Still, that's barely in the range of human perception, so you would probably have an advantage by implementing it in software (although it would probably only be about 1/10th of a second or so)

Dustin Shadbolt 30-01-2011 22:20

Re: Any Team Using A Timer?
 
I would probably just rely on the drive team being conditioned to deploying at a the right time. To many things could happen.

Chris is me 30-01-2011 22:25

Re: Any Team Using A Timer?
 
Keep in mind the refs that will DQ you are no more able to see the milisecond differences between legal and illegal than your drivers are. For that reason I think it has to be manual.

zbanks 30-01-2011 22:47

Re: Any Team Using A Timer?
 
I think it'd be a nice touch. When you're driving, it's hard to look up at the screen to see the remaining time. (I don't know how many audible bells there will be this year: just 15 sec mark, just 10 sec mark, or both)

It'd be nice to have it display on the dashboard with indicators relevant to minibot deployment.

That being said, I don't think there's any reason to automate or regulate deployment. As long as the driver knows how much time they have, you should be able to trust them to do what they want. You wouldn't want any "smart" system to get in their way.

Still, it'd be tempting to have the last 15-20 seconds completely automated. :D

And for those thinking of implementing a timer, make sure to start when teleop starts! The period between auto & teleop can change by a few seconds.

sjspry 30-01-2011 23:39

Re: Any Team Using A Timer?
 
If there's any match timers, like said above, that denote 10s, etc, you could have someone hit a button for each one and collate them (as in, you know they should be 5s apart, either take their median as the 7.5s mark, or do something similar but modify the countdown you've been doing all along).

Jon Stratis 30-01-2011 23:44

Re: Any Team Using A Timer?
 
It seems like everyone's forgetting something important here... Yes, it's difficult for the drivers to watch the timer and drive at the same time. But isn't that what the COACH is for? I know our COACH is going to be keeping one eye on the clock the entire time, and yelling into the drivers ear when it's time to deploy.

Vikesrock 30-01-2011 23:46

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by sjspry (Post 1012165)
If there's any match timers, like said above, that denote 10s, etc, you could have someone hit a button for each one and collate them (as in, you know they should be 5s apart, either take their median as the 7.5s mark, or do something similar but modify the countdown you've been doing all along).

This is probably a bad idea. The best case scenario here is that you end up exactly the same as a manual deployment. In addition you will be distracting one of your two drivers to try and hit a button when they should probably be doing something else.

The worst case is that the button is not hit and your minibot doesn't deploy or is hit accidentally and deploys early.

Eagle, if you mean your coach will tell the driver when to lineup for deployment I agree. If you are going to add a second persons reaction time into your loop for the deployment itself I would not do that if I could possibly help it. Average human reaction time is around 200ms, adding the time it would take the coach to verbalize the command means that your minibot is probably a half second or more behind.

Chris is me 31-01-2011 00:00

Re: Any Team Using A Timer?
 
The drive base should be next to the goal 5 seconds before the 10 second mark. The driver's finger needs to be on that button and as soon as the number 10 is on the screen they hit it.

pfreivald 31-01-2011 00:17

Re: Any Team Using A Timer?
 
We're thinking about using a timer, and then putting a (very) slight delay on it to ensure that we don't have premature deployment...

...and making that code easy to overwrite to driver-triggerable if, during our practice games on Thursday, it draws penalties for some reason.

demosthenes2k8 31-01-2011 00:23

Re: Any Team Using A Timer?
 
My team has the Proxy class of our framework (which is a task that updates 50 times a second) handle a timer counting down remaining match time, and are setting the code up so that the robot will essentially ignore that button until 10 seconds remain. This means that they can hold it down, and it will "trip" as soon as the robot sees 10 seconds remaining, or just deploy at will after that time.

Nadav Zingerman 31-01-2011 04:34

Re: Any Team Using A Timer?
 
Why is everyone talking about looking at the clock when the tower bases change color when it is time to deploy? Seems like a much more convenient place to look at while also driving your robot.

I think that using a timer to deploy is a great idea, one that we have considered and implemented. Every millisecond can count in the minibot race, and a timer could easily shave off a few hundred, perhaps an entire 0.5 seconds. You have practice matches to see if you get penalties. If you do, change it to manual. Prepare both robot codes and have drivers practice both.

davidalln 31-01-2011 08:35

Re: Any Team Using A Timer?
 
I'd advise against it. There is a reason that you have a 3rd coach, whether another student or a mentor. Let them control when you deploy your minibot, its simply not worth the risk of somehow losing sync with the FMS.

pfreivald 31-01-2011 11:31

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by davidalln (Post 1012306)
I'd advise against it. There is a reason that you have a 3rd coach, whether another student or a mentor. Let them control when you deploy your minibot, its simply not worth the risk of somehow losing sync with the FMS.

Has there been a history of the FMS counting seconds differently than the rest of the planet?

Tom Line 31-01-2011 11:44

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by pfreivald (Post 1012408)
Has there been a history of the FMS counting seconds differently than the rest of the planet?

Yes. Last year, and the year before, the teleop time period was significantly longer than it should have been - by 4-8 seconds as I recall. I timed it using a timer on our robot after one of the other mentors brought up the issue here on CD.

I would caution *anyone* who expects to use a timer to deploy to have some method of testing it during your first couple matches to insure that they've corrected the problem.

mwtidd 31-01-2011 12:28

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by pfreivald (Post 1012408)
Has there been a history of the FMS counting seconds differently than the rest of the planet?

I'm also sure in your many years of FRC you've seen the robots get stuck for a few seconds longer than usual after autonomous. It's things like this that worry me when designing a timer. We have no idea what's the cause of pauses like this and what may be happening.

If you start the timer in the wrong place, it may be running during that same pause....
ie the same reason you get a head start to initialize your camera could break your timer because yes it uses the same length of a second, but it may not start with the FMS. I've seen all sorts of weird things happen on the official field that I never saw in testing.

pfreivald 31-01-2011 15:21

Re: Any Team Using A Timer?
 
All cautionary tales assimilated, gents! Thanks!

Nadav Zingerman 31-01-2011 15:56

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by lineskier (Post 1012436)
I'm also sure in your many years of FRC you've seen the robots get stuck for a few seconds longer than usual after autonomous. It's things like this that worry me when designing a timer. We have no idea what's the cause of pauses like this and what may be happening.

If you start the timer in the wrong place, it may be running during that same pause....
ie the same reason you get a head start to initialize your camera could break your timer because yes it uses the same length of a second, but it may not start with the FMS. I've seen all sorts of weird things happen on the official field that I never saw in testing.

It's trivially easy to start the timer when the robot starts the teleop enabled stage. It is pretty much done for you (at least in LabVIEW).

davidalln 31-01-2011 16:04

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by Nadav Zingerman (Post 1012596)
It's trivially easy to start the timer when the robot starts the teleop enabled stage. It is pretty much done for you (at least in LabVIEW).

Perhaps, but like I said, although it appears to be foolproof, its a huge penalty if it allows you to fire too early (penalty + no points for minibot) and a huge disadvantage if its late (deployment is everything). Although it shouldn't mess up, it really is not worth the small risk for the even smaller gain.

My two cents.

mwtidd 31-01-2011 18:40

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by Nadav Zingerman (Post 1012596)
It's trivially easy to start the timer when the robot starts the teleop enabled stage. It is pretty much done for you (at least in LabVIEW).

My point is not regarding the ease. Believe me starting a timer in your teleop function is simple. My point is there is no guarantee that what your code perceives as entering and the start of teleop mode is the same as the FMS actual field time.

Where it looks straight forward in your code, there is a lot of code behind what are you doing to make it that simple. Do not assume that what you see as the teleop loop is called exactly when teleop starts. Also don't assume you can simulate the FMS system on your control system. There are nuances to their system that are not exposed to the driver station software.

sjspry 31-01-2011 22:37

Re: Any Team Using A Timer?
 
This uncertainty is why there's going to need to be some human interaction in here to remain reliable all of the time, unless you use the idea of detecting the base. Not sure how fast the cRIO would be at this, though, if you're using NIVision.

Patrick Chiang 31-01-2011 23:48

Re: Any Team Using A Timer?
 
Two possible cases:
1. You driver was too concentrated on the field and didn't get to the climbing pole on time. In that case, no programming in the world can save you. Unless you plan on making your entire dashboard flash red and emit loud obnoxious noises from the driver station. (which we're doing)

2. Your driver gets to the climbing pole on time. The average teenager reaction time is 160ms. The driver is most likely faster than average. Even if you can get a timer to work perfectly every single time, regardless of field conditions, you'll only be getting a 160ms head start every time you deploy your minibot.

I think it would be more wise to invest your time and resources into building a slightly faster minibot/deployment system, instead of spending all that time developing a precise timer (that measures field conditions) that will give you a 160ms advantage. Something which a slightly more charged battery would give you.

If you're afraid of a trigger-happy driver, a better solution is to design a system where both drivers + the coach have to insert their unique physical key and press their launch triggers at the same time to deploy the minibot. Kinda like a nuclear launch device safety mechanism. It'll be completely fool-proof.

demosthenes2k8 01-02-2011 08:42

Re: Any Team Using A Timer?
 
Well, both drivers AND the coach would be a rules violation, because the coach isn't allowed to touch the controls.

My team DID do a similar system last year - in order to deploy our hanger, the driver had to be holding down both autobalance buttons, THEN the copilot could press the trigger. It worked fairly well, AND prevented our trigger-happy copilot from deploying right away.

santosh 11-04-2011 11:42

Re: Any Team Using A Timer?
 
Has anybody done any tests this year to determine whether or not this years matches are running a little long like people were saying earlier in this thread? or has anyone had issues with deploying slightly early/late if they were using an automated system?

SM987 11-04-2011 12:08

Re: Any Team Using A Timer?
 
In our field tests using time only, the field timer was usually off by less than a second, but in the longer direction, which would result in early deployment. 987 uses automatic deployment with a timer and a photoresistor sensor so as soon as the tower turns blue/red the bot deploys. There is of course a manual button in case we aren't at the tower when it turns or if the sensor fails to read. I would not suggest using time alone.

Chris Fultz 11-04-2011 12:48

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by Patrick Chiang (Post 1013012)
Two possible cases:

I think it would be more wise to invest your time and resources into building a slightly faster minibot/deployment system, instead of spending all that time developing a precise timer (that measures field conditions) that will give you a 160ms advantage. Something which a slightly more charged battery would give you.

Why do you have to choose one or the other. If a team has mechanical and programming students, they could work on both options -

The difference between 1st place and 2nd place is 10 points, and 10 points has determined a lot of matches.

BMWilson 11-04-2011 12:51

Re: Any Team Using A Timer?
 
We designed a sensor to detect the tower's on/off sequence. It initially began as a tower illumiantion and color sensor, but the brightness of the field lighting pretty much monkeywrenched that idea. There are six transitions of light to dark (you can count them if you disagree). After the sixth transition a digital high is sent to the cRio to tell it to deploy the minibot. Works like a charm!

SM987 11-04-2011 12:56

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by BMWilson (Post 1051684)
We designed a sensor to detect the tower's on/off sequence. It initially began as a tower illumiantion and color sensor, but the brightness of the field lighting pretty much monkeywrenched that idea. There are six transitions of light to dark (you can count them if you disagree). After the sixth transition a digital high is sent to the cRio to tell it to deploy the minibot. Works like a charm!

We tried that as well, but had issues when we wound up at the pole after 15 seconds, so we just "hid" our sensor inside our alignment arms and tuned the voltages for red/blue.

jvriezen 11-04-2011 14:11

Re: Any Team Using A Timer?
 
Our bot deployed when both button is pressed and clock <= 10 seconds. We worried about timer differences, but in practice, where we deployed in most all of 20 matches at Lake Superior, we were never called for being early. Our MB was a few inches behind the frame perimeter so we had a fraction of a second of grace there. However, we used pretty fast surgical tubing deployment drive.

In at least one case, where we and our finals alliance partner (2169) were both deploying, our slower bot deployed via timer beat the noticeably faster MINIBOT deployed via human only.

2169 adopted our timer based deployment for their next regional, and I watched them via video streaming in the elims and don't recall any early deployments there, but I can't say for sure.

We tossed around the idea of setting the deployment at something less than 10 seconds to account for clock difference, but we never implemented and it never cost us a penalty. I think we won nearly all (if not all) MB races where we got the bot on the pole (which was most of them) This was due to a combination of timer deploy, fast deploy and reasonably fast bot (gear boxes with Tetrix wheels)

Maybe we were lucky about 17 or 18 consecutive times or so, maybe it was reliable. Who knows.

John Vriezen
Team 2530 "Inconceivable"
Mentor, Drive coach, Inspector

tr6scott 12-04-2011 06:16

Re: Any Team Using A Timer?
 
We use a timer to block inadvertent deployments before 15 seconds left. After 15 seconds, the drivers have to hit 2 buttons to deploy. If the drivers hold the buttons for 2 seconds, it will bypass the timer altogether.

The drivers have deployed early once. Kettering, and the first time the minibot climbed the pole.

DinerKid 12-04-2011 06:46

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by tr6scott (Post 1051832)
We use a timer to block inadvertent deployments before 15 seconds left. After 15 seconds, the drivers have to hit 2 buttons to deploy. If the drivers hold the buttons for 2 seconds, it will bypass the timer altogether.

The drivers have deployed early once. Kettering, and the first time the minibot climbed the pole.

At 15 seconds the finale noise sounds and i must say it seems out of place to me (should be at 10 IMO) but even if you still rely on a driver to deploy the mini bot having a way of making sure that they get through the rest of the match (up to say 12 seconds remaining) without deploying would be a good idea.

My opinion has always been that it should be made the way it was described above where a driver must hit a button and the timer must be <= to 10 seconds. And you would definitely want a manual override in case the timer messed up somehow (10pts for last is better than 0 points for not being able to deploy)

~DK

aechmtwash11 12-04-2011 08:30

Re: Any Team Using A Timer?
 
just wanting to clarify....

So are you all saying the Game time feedback that is available in the FRC default framework code (labview) is not accurate???? Doesn't it just pull from FMS?

Owen Meaker 12-04-2011 12:01

Re: Any Team Using A Timer?
 
I made the code prevent deployment until the 110 second mark. Factoring in the roughly 0.5-1 second deployment time, there is little chance of deploying early, even if the driver clock is off a little. One of the main advantage is that the driver can hold the trigger down, and it will immediately deploy when the 110 second mark is hit. So once they are in position, all they have to do is hold down the trigger and wait, rather than trying to time a button press to a timer.

tr6scott 12-04-2011 12:42

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by DinerKid (Post 1051839)
At 15 seconds the finale noise sounds and i must say it seems out of place to me (should be at 10 IMO) but even if you still rely on a driver to deploy the mini bot having a way of making sure that they get through the rest of the match (up to say 12 seconds remaining) without deploying would be a good idea.
~DK

The cut off point was debated, and because the cRIO is not in sync with the field management, the decision was to "open the window" around the 10 seconds to not interfere with deployment.

After the first premature launch, it was debated again. :) The drivers have learned. Our deployment releases with a servo lock, this action takes .5 second, before the minibot moves. The drivers like the ability to deploy at 10.5 seconds if it is going to be a close match.

ChrisH 12-04-2011 15:22

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by santosh (Post 1051662)
Has anybody done any tests this year to determine whether or not this years matches are running a little long like people were saying earlier in this thread? or has anyone had issues with deploying slightly early/late if they were using an automated system?

I have it from a reliabe source in FIRST HQ that this issue has been addressed and corrected in the current version of FMS.

Joe Ross 12-04-2011 15:39

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by aechmtwash11 (Post 1051866)
just wanting to clarify....

So are you all saying the Game time feedback that is available in the FRC default framework code (labview) is not accurate???? Doesn't it just pull from FMS?

FMS does not publish the time. The LabVIEW framework looks at the state transitions (telop, autonomous, disabled) and uses the cRIO timer to measure the elapsed time in each state.

Last year, the FMS timer was Accurate but not Precise. Hopefully, that's now be rectified.

Eric222 12-04-2011 20:00

Re: Any Team Using A Timer?
 
I would advise you against using a timer. At Boston, the Driver Station and our robot lost communication for about 10 seconds (Due to a bad wire connection, we learned later on), and we had a timer programmed in for firing the minibot. The robot luckily reconnected, but the end result was that the minibot did not deploy when we tried to launch it in the end of the match. We basically threw the timer out of the program after that match. So, I would listen to everyone else when they say that it is probably best to leave minibot deployment up to the human controller. Take the chance of complete failure to deploy out of the picture.

Ziv 12-04-2011 21:56

Re: Any Team Using A Timer?
 
Team 125 also used a timer at Boston. The fraction of a second head start our minibot had against team 78's equally fast minibot was crucial in the finals. Given that the FMS's time seems well behaved—we were never penalized for early deployment—I would at least give the timer careful consideration. (However, as is the case with any automated function, there should be a manual override that can deal with cases like the one Eric described above.)

Chris Fultz 12-04-2011 22:36

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by Eric222 (Post 1052151)
So, I would listen to everyone else when they say that it is probably best to leave minibot deployment up to the human controller. Take the chance of complete failure to deploy out of the picture.

It is smart to make automated systems, but it is always wise to have a manual override.

dwodrich 13-04-2011 08:27

Re: Any Team Using A Timer?
 
So what value are teams using? Elapsed time is what the framwork provides, so 15+120-10 = 125 as the deployment time or does the elapsed time start over at the start of teleopt like the big screen? Should we use 125 or 110?

plnyyanks 13-04-2011 09:20

Re: Any Team Using A Timer?
 
Quote:

Originally Posted by dwodrich (Post 1052347)
So what value are teams using? Elapsed time is what the framwork provides, so 15+120-10 = 125 as the deployment time or does the elapsed time start over at the start of teleopt like the big screen? Should we use 125 or 110?

we only allowed out minibot to be deployed after 110 seconds of teleop had elapsed. We never got penalized for an early deployment

Blackphantom91 13-04-2011 16:32

Re: Any Team Using A Timer?
 
A team at a regional used an I phone timer to do the time (which is not legal) I would agree with most above do it of visual and practice way, The refs will deactivate quick if you pass that cylinder the minibot.

Josh Drake 13-04-2011 21:48

Re: Any Team Using A Timer?
 
We told the head ref what we were doing to try to avoid a tower disabling (never got one). In one match it looked like to me we deployed early, because, like the refs, they are looking at the light on the tower to change. This light blinks, so it may be inbetween blinks at 10s. The operator had an override, but she felt better knowing we were as fast as possible without the human factor.


All times are GMT -5. The time now is 23:31.

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