Quote:
Originally Posted by dcarr
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.