Need Help..Romi robot programmed with FRC 2022 Labview runs motors in teleop and Autonomous modes for 1.5 seconds and then the motors stop

2022 Romi Robot Project.zip (2.8 MB)

Hello.

I am sorry to hear you are having problems with your Romi robot. We are not involved with the software side of the WPILib project and do not use LabVIEW, so you would need to contact the WPILib team if the problem is software related. However, we can help you determine if your Romi hardware is functioning properly.

From your description, I suggest first making sure you are using new or freshly charged batteries. If the problem persists, you can test the Romi hardware separately by removing the Raspberry Pi for now and using a computer to program the control board with the MotorTest.ino example program from our Romi 32U4 Arduino library. You can find download links and installation instructions for that library in the Romi 32U4 Arduino Library section of the Romi 32U4 Control Board user’s guide. You can find instructions for programming the control board in the Programming the Romi 32U4 Control Board section.

Please note that the MotorTest.ino example waits for you to press the A button before driving the motors forward and backwards in an alternating pattern. I recommend either lifting the robot so its wheels are off the ground or putting it on the ground in an open space to avoid having it drive off a desk or table.

Brandon

This document may help you a bit: Programming the Romi (LabVIEW) — FIRST Robotics Competition documentation

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.

Confirmed…
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

Is your robot working flawlessly now?

correct…it has been working well using the FRC Driver Station and Romi Code from 2022 FRC labview code at this point. Encoders are working well. Working to integrate the Gyro.

1 Like

After attempting to program the gyro and accelerometer with no success it is determined that future updates to the WPILibPi_image contained updates to support these sensors, but due to how the Romi alive heartbeat to the Driver station was implemented, these updates can not be implemented with the FRC Driver Station and Labview program as the Romi will shut down after 1.5 seconds due to the Driver Station only sending the heartbeat on change of state. WPILibPi should have implemented the heart beat in the robot program code as the code runs on the computer and transmits via websockets to the Romi. this would have allowed all applications to run vs adopting the Driver Station heartbeat where programming of the heartbeat behavior is not allowed. Abandoning the Romi as a tool to teach FRC teams how to program Labview as am spending too much time troubleshooting issues deriving from the WPILibPi vs learning Labview and programming sensors in Labview. Sad as the Romi has great potential, just no Labview support in the Romi community to make effective as a learning tool