mattyoung101 / omicron

Repo for Team Omicron, RoboCup Jr Open Soccer, 2019-2020
Mozilla Public License 2.0
1 stars 0 forks source link

Robots stop responding after some time #3

Open mattyoung101 opened 4 years ago

mattyoung101 commented 4 years ago

Bug we found today (Friday) where the robot will stop responding to the ball completely after some time. Seems not to be a crash, but timing related (e.g. a hang somehow). Teensy LED is not blinking, meaning either it's frozen or we on the ESP are failing to give it Protobuf packets (as UART waits until it receives a packet). Maybe time out on the Teensy if waiting for too long for a new packet?

mattyoung101 commented 4 years ago

@ethanol20924 Procedure for debugging:

  1. Record which robot and which mode it's in. Also useful is rough estimate of time since bug last occurred and a description of what the robot was doing leading up to the bug (e.g. if it switched).
  2. Wait for a minute and observe if it reboots or not.
  3. Turn on ENABLE_VERBOSE_BT and flash to the non-broken robot. Observe if it will reconnect to BT and if so what it says in the verbose BT logs. Try and see if any variables (eg ball distance or state name) are changing
  4. Press the reset button on the robot and see what it does. Also see if it changes states in verbose BT log after button is pressed.
  5. See if Teensy light is blinking (usually not, but just interested to see)
  6. Press reset button on ESP and see if it will work again.

At this point, if the robot's not working, power cycle the robot and continue.

mattyoung101 commented 4 years ago

It appears this issue only occurs when Bluetooth is running (as it didn't happen any time at nationals when BT was disabled).