Go to Post Oh man... 20% skinnier, 40% dorkier, ... if that's what turns into one of our best mentors, I REALLY need to find a new hobby. ;) - Rich Kressly [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 23-03-2015, 15:29
rich2202 rich2202 is online now
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,192
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: FMS enabling sequence?

There is one Ethernet connection between the FMIS Server and the rest of the world. The commands have to go out serially.

I'm guessing the Cisco Wifi router has 3 channels, and 2 robots are assigned to each channel. Wifi Contention could delay the receipt of commands by a robot.

If the command is routed through the Driver Station, then there is minimal delay between when FMIS sends the Auto Start, and when your DS is first able to react.

How fast your robot can react to the DS commands depends upon how much wifi traffic there is on your signal. Also, the Cisco Router has one ethernet connection, so how fast your DS responds will determine where in the que is your command.

Last edited by rich2202 : 23-03-2015 at 15:40.
Reply With Quote
  #2   Spotlight this post!  
Unread 23-03-2015, 15:55
FrankJ's Avatar
FrankJ FrankJ is offline
Robot Mentor
FRC #2974 (WALT)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Marietta GA
Posts: 1,923
FrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond repute
Re: FMS enabling sequence?

Quote:
Originally Posted by rich2202 View Post
There is one Ethernet connection between the FMIS Server and the rest of the world. The commands have to go out serially.

I'm guessing the Cisco Wifi router has 3 channels, and 2 robots are assigned to each channel. Wifi Contention could delay the receipt of commands by a robot.
The FMS AP has 6 SSIDs Each robot & DS is own its own VLAN & AP. Presumably there is only one ethernet connection to the FMS server. The FMS server sends the enable to the Driver stations which then send the enable to the robots. I don't know how you would be able to predict how much jitter is in all that what testing. Since the enable is being processed by the DS, maybe the speed of the DS has some effect as well?
__________________
If you don't know what you should hook up then you should read a data sheet
Reply With Quote
  #3   Spotlight this post!  
Unread 23-03-2015, 16:05
dcarr's Avatar
dcarr dcarr is offline
#HoldStrong
AKA: David Carr
FRC #3309 (Friarbots)
Team Role: Mentor
 
Join Date: Dec 2010
Rookie Year: 2009
Location: Anaheim
Posts: 954
dcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond repute
Re: FMS enabling sequence?

I'd be interested to hear how this was approached with Cheesy Arena.
__________________
Team 3309
2016 Los Angeles Chairman's Award Winner
2016 Orange County Regional Winner with 3476 & 6220
Team3309.org
Orange County Robotics Alliance
Reply With Quote
  #4   Spotlight this post!  
Unread 23-03-2015, 17:13
Pat Fairbank's Avatar
Pat Fairbank Pat Fairbank is offline
Circuit Breaker
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2001
Location: San Jose, CA
Posts: 2,132
Pat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond repute
Send a message via MSN to Pat Fairbank
Re: FMS enabling sequence?

Quote:
Originally Posted by dcarr View Post
I'd be interested to hear how this was approached with Cheesy Arena.
Cheesy Arena sends DS packets at match period boundaries (with 10ms resolution) and at 250ms intervals. A single thread of execution decides whether a packet needs to be sent, and sends all six in sequence (by iterating through a hashmap of the driver stations, so the order is not deterministic). The DS packets are UDP, so all six are probably sent over a period spanning far less than a millisecond. I would guess that the six driver stations would receive the "enable" signal within a similar total time frame.

It's well known that the FMS doesn't communicate directly with the robot; the FMS informs the DS what state the robot should be in and the DS passes it along with the joystick information. What I don't know is whether the DS syncs to send a robot packet whenever it receives an FMS packet, or if it only passes on the enable signal next time its regular loop runs. If it's the latter case, then the order and timing of robot enablement is determined presumably by when each driver station process was started and by the DS-to-robot packet interval.

Ideally, the DS should send a packet to the robot as soon as it receives an FMS packet that changes its disable/enable/auto/teleop state, regardless of when it last sent a packet. Someone could probably test whether it does this or not using Wireshark.
__________________
Patrick Fairbank
Team 254 | Mentor (2012-)
Team 1503 | Mentor (2007-2011)
Team 296 | Alumnus (2001-2004) | Mentor (2005-2006)

patfairbank.com
Reply With Quote
  #5   Spotlight this post!  
Unread 23-03-2015, 20:51
Citrus Dad's Avatar
Citrus Dad Citrus Dad is offline
Business and Scouting Mentor
AKA: Richard McCann
FRC #1678 (Citrus Circuits)
Team Role: Mentor
 
Join Date: May 2012
Rookie Year: 2012
Location: Davis
Posts: 988
Citrus Dad has a reputation beyond reputeCitrus Dad has a reputation beyond reputeCitrus Dad has a reputation beyond reputeCitrus Dad has a reputation beyond reputeCitrus Dad has a reputation beyond reputeCitrus Dad has a reputation beyond reputeCitrus Dad has a reputation beyond reputeCitrus Dad has a reputation beyond reputeCitrus Dad has a reputation beyond reputeCitrus Dad has a reputation beyond reputeCitrus Dad has a reputation beyond repute
Re: FMS enabling sequence?

Quote:
Originally Posted by Pat Fairbank View Post
Cheesy Arena sends DS packets at match period boundaries (with 10ms resolution) and at 250ms intervals. A single thread of execution decides whether a packet needs to be sent, and sends all six in sequence (by iterating through a hashmap of the driver stations, so the order is not deterministic). The DS packets are UDP, so all six are probably sent over a period spanning far less than a millisecond. I would guess that the six driver stations would receive the "enable" signal within a similar total time frame.

It's well known that the FMS doesn't communicate directly with the robot; the FMS informs the DS what state the robot should be in and the DS passes it along with the joystick information. What I don't know is whether the DS syncs to send a robot packet whenever it receives an FMS packet, or if it only passes on the enable signal next time its regular loop runs. If it's the latter case, then the order and timing of robot enablement is determined presumably by when each driver station process was started and by the DS-to-robot packet interval.

Ideally, the DS should send a packet to the robot as soon as it receives an FMS packet that changes its disable/enable/auto/teleop state, regardless of when it last sent a packet. Someone could probably test whether it does this or not using Wireshark.
That's interesting. So an alliance might want to be careful as to the order in which it connects drivers stations. (And this can be a real world issue.)
Reply With Quote
  #6   Spotlight this post!  
Unread 23-03-2015, 16:08
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,092
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: FMS enabling sequence?

Based on things I've seen in the past, its a mix between ds, fms, fpga and the robot code itself. Based on my understanding I would say the fms actually affects it very little.
__________________
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 23-03-2015, 16:15
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: FMS enabling sequence?

It could be multicast to begin to deal with the delay of serially issuing the "change of state" messages.
__________________
Fast, cheap or working - pick any two!
Reply With Quote
  #8   Spotlight this post!  
Unread 23-03-2015, 16:13
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: FMS enabling sequence?

I would think that each DS is running its own polling loop asynchronously at ~50Hz (the rate of driver control packets). So even if the disabled bit toggles simultaneously for all six bots from the FMS (which it doesn't since the FMS->DS packets must be sent serially, but it ought to be close), there could be a 20ms swing in when each DS sends the first enabled packet depending on the phasing.

( I am just guessing at how the FMS and DS are architected here since I don't think it is publicly documented; please set me straight if I have made an incorrect assumption. )

Realistically, with our wireless links, synchronization is always going to be hard.
Reply With Quote
  #9   Spotlight this post!  
Unread 23-03-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,092
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: FMS enabling sequence?

Quote:
Originally Posted by Jared Russell View Post
I would think that each DS is running its own polling loop asynchronously at ~50Hz (the rate of driver control packets). So even if the disabled bit toggles simultaneously for all six bots from the FMS (which it doesn't since the FMS->DS packets must be sent serially, but it ought to be close), there could be a 20ms swing in when each DS sends the first enabled packet depending on the phasing.

( I am just guessing at how the FMS and DS are architected here since I don't think it is publicly documented; please set me straight if I have made an incorrect assumption. )

Realistically, with our wireless links, synchronization is always going to be hard.
There's also another 20+ ms delay caused by the wpilibs if you use anything but the sample robot template. Could end up being up to 40ms depending on how the fpga loops.
__________________
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
  #10   Spotlight this post!  
Unread 23-03-2015, 16:33
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: FMS enabling sequence?

Quote:
Originally Posted by Thad House View Post
There's also another 20+ ms delay caused by the wpilibs if you use anything but the sample robot template. Could end up being up to 40ms depending on how the fpga loops.
Please elaborate?
Reply With Quote
  #11   Spotlight this post!  
Unread 23-03-2015, 16:47
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,092
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: FMS enabling sequence?

Quote:
Originally Posted by Jared Russell View Post
Please elaborate?
In LV I know that it runs disabled for 1 extra loop after it receives an enabled packet. Then it will run auto on the next enabled packet.

Based on the last time I looked in the Java code, it will run auto init, then the next packet run auto periodic. So unless you are starting your sequence in auto init, it wont run motors until it gets a second enabled packet.

Note that the whole time this is happening, the fpga is enabled, so it will run 20ms with the values it last receives. This is why there are times the robot jumps between disabled and enabled.
__________________
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
  #12   Spotlight this post!  
Unread 23-03-2015, 16:59
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: FMS enabling sequence?

Quote:
Originally Posted by Thad House View Post
Based on the last time I looked in the Java code, it will run auto init, then the next packet run auto periodic. So unless you are starting your sequence in auto init, it wont run motors until it gets a second enabled packet.
I do not think this is currently the case in Java (for IterativeRobot at least). It does check for the new data flag (via nextPeriodReady()), but this flag is not cleared after calling autonomousInit(), so autonomousPeriodic() should be invoked on the first packet
Reply With Quote
  #13   Spotlight this post!  
Unread 23-03-2015, 20:53
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,092
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: FMS enabling sequence?

Quote:
Originally Posted by Jared Russell View Post
I do not think this is currently the case in Java (for IterativeRobot at least). It does check for the new data flag (via nextPeriodReady()), but this flag is not cleared after calling autonomousInit(), so autonomousPeriodic() should be invoked on the first packet
Ah. They might have changed that then.

However, LV still does do this, and runs disabled one last time, and still has to wait for another packet to be sent before actually enabling auto. so auto in LV will have a delay of one packet before actually running auto code.
__________________
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
  #14   Spotlight this post!  
Unread 23-03-2015, 16:45
Jared's Avatar
Jared Jared is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Connecticut
Posts: 602
Jared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond repute
Re: FMS enabling sequence?

Here's a frame by frame of the Dallas Q39 (118 and 3310 in same match).

118 is going for their 3 tote auto, 3310 is going for containers, and a team 932 (middle of field red side) is driving forward at a high speed in auto mode.

Frame 1 - Yellow lights on field illuminate
Frame 2 - Red/Blue DS stack lights illuminate
Frame 3 - Nothing
Frame 4 - 932 tips back and begins movement
Frame 5 - 932 continues to move
Frame 6 - 3310 begins to drop arms

Another frame by frame on Dallas F1 (118 grabbing from step, 148 auto)

Frame 1 - Yellow lights
Frame 2 - stack lights
Frame 3 - Nothing
Frame 4 - 148's arm moves
Frame 5 - 118 drops arms

From watching a few other matches, there is usually a different number of frames between lights and robot movement for teams like 118 and 3310.
Reply With Quote
  #15   Spotlight this post!  
Unread 23-03-2015, 17:12
Bryan Herbst's Avatar
Bryan Herbst Bryan Herbst is offline
Registered User
AKA: Bryan
FRC #2052 (KnightKrawler)
Team Role: Mentor
 
Join Date: Sep 2007
Rookie Year: 2007
Location: Minneapolis, Minnesota
Posts: 544
Bryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond repute
Re: FMS enabling sequence?

Quote:
Originally Posted by Jared Russell View Post
I would think that each DS is running its own polling loop asynchronously at ~50Hz (the rate of driver control packets). So even if the disabled bit toggles simultaneously for all six bots from the FMS (which it doesn't since the FMS->DS packets must be sent serially, but it ought to be close), there could be a 20ms swing in when each DS sends the first enabled packet depending on the phasing.

( I am just guessing at how the FMS and DS are architected here since I don't think it is publicly documented; please set me straight if I have made an incorrect assumption. )

Realistically, with our wireless links, synchronization is always going to be hard.
I came here to say the same thing. Regardless of whether the FMS sends out the signals in parallel or in serial, the time between the FMS sending out each packet is going to be negligble compared to any number of other factors in the system. An obvious unknown here is that each team's driver station has its own limitations due to wildly varying hardware and drivers.

Any anecdotal or video "evidence" is rather worthless in this discussion without knowing a lot more about each robot (including seeing its code). If team X's arm appears to move at 0:00:00, but team Y's wheels start spinning at 0:00:20, how do we know which team got the "start auto" signal first? It is entirely possible that team Y's code is simply slower or explicitly waits 20ms. It is also possible that there are mechanical limitations that caused team Y to start visibly moving later.


It would certainly be interesting to see some hard data on when robots across a number of matches receive the signals, but I wouldn't rely on any such data being universally accurate, nor would I hope to have perfect synchronicity in robot start times.
__________________
Team 2052- Knightkrawler
Mentor and volunteer

Last edited by Bryan Herbst : 23-03-2015 at 17:28.
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 14:13.

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