Vexnet lag

We have been experiencing lag during practice. Sometimes so severe that it will take about 5 seconds for the robot to respond. We don’t think the motors are over heating because the motors don’t feel warm and everything stops at once. Sometimes it’s worse than other times and most of the time it doesn’t bother us at all. However it would stink of it were to happen in the middle of the game. So any idea on how this can be fixed?

What code are you running?

If you have a badly tuned PID Loop, you could be creating lag for yourself, I overtuned my PID, and it took 10 seconds for the robot to respond once.

Just the operator control code, and I’m using ROBOTC. Also I don’t have any PID.

I have talked with another team who has had an issue like this as well.

I suppose you are using the white 2.0 keys? Apparently these sometimes don’t find an excellent frequency, and the transmissions are delayed, something they have seen before in RC cars that use the same radios as well.

Have you tried turning off and reconnecting or switching up the keys? Have you tried if it works normally in tethered mode? (controller plugged to cortex with cable instead of keys)

What are the leds (cortex/joystick) doing when this happens?

Is it really lag, that is, you perform an action (press a button) and see the result of that several seconds later? or is it just loss of control for a period of time?

we are using the 2.0 keys. We have, we have tried putting fresh batteries also. We have not tried switching the keys. I ave not tried using the cable yet. I’ll try that when I go over later today. the issue is that the lag doesn’t always happen. sometimes will go a whole practice with no lag, so it may be difficult to quickly switch it to the to USB cable when the lag happens.

The LEDs are just blinking the way they normally are. And I think it is real, solid oak, made in the USA, genuine lag.

  1. Are you hooked to the robotc debugger at the time? This has some issues keeping up with the new keys at times with excessive variables or streaming too much debug stream print per time slice. (Not sure it would lag though.)

  2. What versions of robotc and firmware are you running?

  3. Is everything up to date with the firmware?

  4. Anything in the environment that is weird signal-wise? (metal roof 3 feet from your head, cordless phone running on the same frequency, you happen to be in a Faraday cage, etc)

  1. no I’m not, I do have code that sends the value of all the sensors in the joystick to the debug stream, but it only does that if I press a certain button.

  2. pretty sure i’m up to date, will check when I go to program later today

  3. again, I’m pretty sure, will check when I have the chance

  4. this may be it, the robotics room is in the basement of a 100 year old school building so we are basically surrounded by metal, also the field is on a raised platform (so we practice the way it is at worlds) making it closer to the ceiling.

if it is because of that, there isn’t anything that can be done, fortunately it’s not usually severe and doesn’t happen all the time.

It’s the other way around, the new keys cannot keep up with the amount of data that ROBOTC requests. Too much data can cause the joystick to crash and reset (not tried yet with V1.46, that was the case with older versions and I doubt it improved yet).

How many ROBOTS are typically practicing? ie. are there multiple VEXnet connections?

We only have one robot, also as we are practicing, (right now) it seems to be more like connection loss. And the firmware is up to date.

As others have said, there’s a chance that it could be code.

Since we also seem to be suspecting that the building is an issue, try moving the robot outside or to a different room to see if you can repeat the problem.

If you’re unable to get it fixed and don’t have extra keys, I should be able to arrange to let you test a new set of keys this weekend (I’m assuming you’re going to the K.I.D.S., Inc competition). I don’t know if I’ll be able to get you keys for the whole competition, but at the very least, we’ll be able to determine whether or not there’s something wrong with the keys.

Issue solved (I think). I just got to the robotics room a few minutes ago. I first tested with a USB cable, worked fine. Tested again with VEXnet, a lot of short lived, but annoying connection lost. Tried unplugging the WiFi router that is only a few feet from the field of play, works fine. Plug it back in still works fine. So I think we just need to restart our router every time this happens. Still not 100% sure though.