wpilibsuite / WPILibPi

WPILib Raspberry Pi images designed for FRC (formerly FRCVision)
Other
86 stars 40 forks source link

Running 2022 FRC Driver Station and Labview code, Romi disables all outputs after 1.5 seconds #223

Open Cap127 opened 2 years ago

Cap127 commented 2 years ago

Looks like wpilib-ws-robot-romi implemented PR #95 and wpilibsuite/wpilib-ws-robot#26. Leveraging the constant messaging from the driver station we are able to determine if we are still receiving messages from wpilib. If we don’t receive a message in 500 ms we will kill the heartbeat to the Romi which is checked every 1 sec setting a max overrun of 1.5 sec.

This is the exact cause of the issue as the motors will be re-enabled by switching modes on the Driver Station.

Turning on the Romi’s console output this is confirmed as the monitored FRC DriverStation Heartbeat appears only to be active on DriverStation mode change of state

Romi’s console output… 2022-03-14T09:53:19.996Z [ROMI] info: DS Packet Heartbeat Acquired 2022-03-14T09:53:19.999Z [ROMI] info: Robot ENABLED 2022-03-14T09:53:20.498Z [ROMI] warn: DS Packet Heartbeat Lost 2022-03-14T09:54:39.725Z [ROMI] info: DS Packet Heartbeat Acquired 2022-03-14T09:54:39.726Z [ROMI] info: Robot DISABLED 2022-03-14T09:54:40.226Z [ROMI] warn: DS Packet Heartbeat Lost 2022-03-14T09:54:56.131Z [ROMI] info: DS Packet Heartbeat Acquired 2022-03-14T09:54:56.132Z [ROMI] info: Robot ENABLED 2022-03-14T09:54:56.631Z [ROMI] warn: DS Packet Heartbeat Lost 2022-03-14T09:55:01.332Z [ROMI] info: DS Packet Heartbeat Acquired 2022-03-14T09:55:01.332Z [ROMI] info: Robot DISABLED 2022-03-14T09:55:01.833Z [ROMI] warn: DS Packet Heartbeat Lost

Looks like the updates made in wpilib-ws-robot-romi would not be compatible with FRC Labview and FRC labview based Driver Station for Labview code learning.

This was Confirmed by… reverting from latest release WPILibPi_image-v2022.1.1-Romi.zip to WPILibPi_image-v2021.2.1-Romi.zip (which does not have PR [#95] implemented ) allows the Romi to run without shutting the motors down after 1.5 seconds

Cap127 commented 2 years ago

Running Romi Web Service v1.1.4 and WPILibPi 2022.1.1 Release 1.5 second timeout does NOT occur. Update implemented in Romi Web Service v1.1.5 broke the ability to run 2022 Driver Station and Labview programs. When enabled, the drives will run 1.5 seconds and then stop due to the updates made in Web Service v1.1.5 and carries fwd.

When can a fix be implemented?

Cap127 commented 2 years ago

Consider requiring a Heartbeat in the users program since it runs on the users computer and communicates via Websocket to the ROMI.