Sure seems like it but both LLLimelight, an integrated vision coprocessor and library are 2023.4.2.
What is your networking setup? Apologies if you already mentioned it above, I couldnāt find it.
Always nice if you can eliminate Ethernet hardware problems as a cause of trouble. Weak transmitter/receivers, poor cabling (a break or severely crimped cable), long cable runs, bad connectors, noise source such a space heater, motors, air conditioner, fan, welder, etc. can be a problem.
Check the ifconfig
and netstat
for your interface and other log commands as available.
In particular, are you properly using a network switch? (Havenāt read the thread closely sorry if already mentioned)
Yes, we do use a switch. Using a switch is pretty straight forward so what would be an improper usage? As to the rest of our network, it is vanilla FRC and we have no known problems with the hardware aspect of networking.
In looking at the errors we get, it seems the NT4 server on the LL disconnects from the PV library on the robot because it chooses to, not due to network problems. Then it reconnects and we see the data type mismatch error. Then things run ok until the disconnect/connect happens again. It goes on like that. This really feels like a problem with network tables on the PV image running on the LL.
That said, I discovered we are behind in our Wpilib version, running 2023.4.2. 2023.4.3 release notes indicate changes to network tables. So I will install 2023.4.3 and see if that corrects the problem.
Updating to 2023.4.3 Wpilib made no difference. When PV on the LL is connected to the PV library and network tables shows the PV data posted by PV on the LL, target identification and tracking works well.
The problem continues to be unreliable connection to NT on the LL. And, when we lose connection, the LED turns off and we canāt get it to turn back unless we restart the LL from the PV webconsole or reboot the robot. This connectivity issue and inability to control the LED makes testing PV very difficult.
I read it. Sorry - I suggest itās time for the dreaded MRE.
Gaak! I think I may attempt the PVPhoton Vision, an open source vision library for coprocessors development version as suggested on discord.
I created an MRE program from one of the PV examples and tested it and our full robot code extensively today.
I observed the same PV issues I have been pursuing and a new issue which may be connected:
PV issues: Besides random disconnects, PV on the LL sometimes appears to freeze. That is, the heartbeat data shown in outlineviewer and the PV webconsole target data stops changing. Its as if PV has frozen or maybe some issue is preventing PV from updating the network tables. This will clear on itās own if you wait. A variation of this is the heartbeat and latency fields in NT are being updated but the LED request field is ignored. This does not clear on itās own, requires a restart of the LL from PV webconsole.
PV also appears to randomly restart. This is characterized by PV data disappearing from outlineviewer, the LED turns off and the PV console loses camera feed. It will do this with robot just sitting disabled. This also recovers on itās own if you wait.
Sometimes PV works and I am able to test the robot alignment code and a bit later it is failing often enough that testing becomes difficult.
I have the minimal test program that is very simple. It displays mostly the same issues with PV.
Also today I saw something new: PV completely lost itās configuration from one moment to the next. My pipline was goneā¦the pipline selection displays new pipeline and the configuration values are random. PV had worked correctly moments beforeā¦I just ran the align to tape command again and robot went beserk because the data being returned by the random config was quite incorrect. Fortunately I had downloaded my configuration and reloaded it.
Outlineviewer: There is some sort of issue between NT4 and running in Test mode (Livewindow enabled). When I run in test mode, the Outlineviewer set to use NT4, repeatedly connects and disconects as shown in the riolog:
NT: DISCONNECTED NT4 client 'outlineviewer@2' (from 10.44.50.163:51421):
NT: Got a NT4 connection from 10.44.50.163 port 51467
NT: CONNECTED NT4 client 'outlineviewer@2' (from 10.44.50.163:51467)
NT: DISCONNECTED NT4 client 'photonvision@1' (from 10.44.50.11:53986): remote end closed connection
NT: NT4 socket error: operation canceled
NT: DISCONNECTED NT4 client 'outlineviewer@2' (from 10.44.50.163:51467): transmit stalled
NT: Got a NT4 connection from 10.44.50.163 port 51485
NT: CONNECTED NT4 client 'outlineviewer@1' (from 10.44.50.163:51485)
NT: Got a NT4 connection from 10.44.50.11 port 55594
NT: CONNECTED NT4 client 'photonvision@2' (from 10.44.50.11:55594)
NT: DISCONNECTED NT4 client 'outlineviewer@1' (from 10.44.50.163:51485): transmit stalled
NT: Got a NT4 connection from 10.44.50.163 port 51499
NT: CONNECTED NT4 client 'outlineviewer@1' (from 10.44.50.163:51499)
NT: DISCONNECTED NT4 client 'outlineviewer@1' (from 10.44.50.163:51499): transmit stalled
NT: Got a NT4 connection from 10.44.50.163 port 51516
Run Outlineviewer in NT3 mode and no problem. This issue takes a reboot of RobRio to clear once it starts.
It also seemes when I run in Test mode, I have more problems of the problems with PV on the LL as described above. These two issues might well be connected, as OV and PV are using NT4. I have been running test mode up to now to see LiveWindow data posted by our code. Note that our test mode starts teleop so the robot runs as if in teleop mode but LW is enabled.
When I run in Teleop mode, things go smoothly with outlineviewer and better with PV (though not 100%). The problems with PV (above) still happen but at a lower frequency.
This OV problem has been known for a while but I did not connect it to running in test mode until today.
An update to this issue. After a lot of testing and interacting with PV folks on the PV Discord, I found that reducing the resolution appeared to solve the problems with PV on the LL. I suspect it all boils down to memory problems driven by the high resolution and the higher memory requirements of NT4 when running in LiveWindow mode.
In any case with the resolution reduced to 960 PV on the LL is pretty reliable LiveWindow or not.
This issue should be fixed for 2024. Please try the 2024 beta release (when itās out).