FIRST-Tech-Challenge / SkyStone

FTC SDK
https://www.firstinspires.org/robotics/ftc/what-is-first-tech-challenge
275 stars 1.04k forks source link

LynxModule errors with servos on Control Hub #217

Closed Milotrince closed 4 years ago

Milotrince commented 4 years ago

After running an opmode with the robot 1 to 5 times, servos become unresponsive due to Lynx errors thrown. Restarting robot does not help; have to recycle the power (reconnect/switch battery).

Setup: Control Hub = module 2, Expansion Hub = module 1 I need to check if the firmware of both are updated; will update this post Friday.

Things I've tried:

  1. Connecting servos to control hub instead of old expansion hub and vice versa
  2. https://github.com/ftctechnh/ftc_app/issues/674 Tried replacing RS485 cable; although, only tried with one other identical-looking cable
  3. https://github.com/ftctechnh/ftc_app/issues/367 Magic is not on my side :(
2020-01-29 16:02:15.141 2732-2980/com.qualcomm.ftcrobotcontroller E/Assert: java.lang.RuntimeException: assertion failed: 0x0bd53346 on 0x0489952b: closed
2020-01-29 16:02:15.146 2732-2980/com.qualcomm.ftcrobotcontroller E/Assert:     at com.qualcomm.hardware.lynx.LynxUsbDeviceDelegate.assertOpen(LynxUsbDeviceDelegate.java:102)
2020-01-29 16:02:15.147 2732-2980/com.qualcomm.ftcrobotcontroller E/Assert:     at com.qualcomm.hardware.lynx.LynxUsbDeviceDelegate.getSerialNumber(LynxUsbDeviceDelegate.java:251)
2020-01-29 16:02:15.147 2732-2980/com.qualcomm.ftcrobotcontroller E/Assert:     at com.qualcomm.hardware.lynx.LynxModule.getSerialNumber(LynxModule.java:605)
2020-01-29 16:02:15.148 2732-2980/com.qualcomm.ftcrobotcontroller E/Assert:     at com.qualcomm.hardware.lynx.LynxController$PretendLynxModule.getSerialNumber(LynxController.java:434)
2020-01-29 16:02:15.149 2732-2980/com.qualcomm.ftcrobotcontroller E/Assert:     at com.qualcomm.hardware.lynx.LynxNackException.<init>(LynxNackException.java:58)
2020-01-29 16:02:15.150 2732-2980/com.qualcomm.ftcrobotcontroller E/Assert:     at com.qualcomm.hardware.lynx.commands.LynxRespondable.throwIfNack(LynxRespondable.java:325)
2020-01-29 16:02:15.150 2732-2980/com.qualcomm.ftcrobotcontroller E/Assert:     at com.qualcomm.hardware.lynx.commands.LynxRespondable.send(LynxRespondable.java:239)
2020-01-29 16:02:15.151 2732-2980/com.qualcomm.ftcrobotcontroller E/Assert:     at com.qualcomm.hardware.lynx.LynxServoController.internalSetPwmEnable(LynxServoController.java:218)
2020-01-29 16:02:15.152 2732-2980/com.qualcomm.ftcrobotcontroller E/Assert:     at com.qualcomm.hardware.lynx.LynxServoController.setServoPosition(LynxServoController.java:270)
2020-01-29 16:02:15.176 2732-2980/com.qualcomm.ftcrobotcontroller W/LynxServoController: LynxSetServoEnableCommand was abandoned waiting for ack

2020-01-29 16:02:27.974 2732-2977/com.qualcomm.ftcrobotcontroller V/RobotCore: timeout: abandoning waiting 250ms for ack: cmd=LynxFailSafeCommand mod=1 msg#=250
2020-01-29 16:02:27.975 2732-2977/com.qualcomm.ftcrobotcontroller V/RobotCore: nack rec'd mod=1 msg#=250 ref#=0 reason=ABANDONED_WAITING_FOR_ACK:257
2020-01-29 16:02:27.977 2732-2977/com.qualcomm.ftcrobotcontroller W/LynxUsb: LynxFailSafeCommand was abandoned waiting for ack
2020-01-29 16:02:28.184 2732-2977/com.qualcomm.ftcrobotcontroller V/LynxModule: retransmitting: mod=1 cmd=0x7f05 msg#=251 ref#=0 
2020-01-29 16:02:28.286 2732-2977/com.qualcomm.ftcrobotcontroller V/LynxModule: retransmitting: mod=1 cmd=0x7f05 msg#=251 ref#=0 
2020-01-29 16:02:28.334 2732-2977/com.qualcomm.ftcrobotcontroller V/LynxModule: retransmitting: mod=1 cmd=0x7f05 msg#=251 ref#=0 

full excerpt (ignore TeamCode): lynx-servo-errors.txt

Windwoes commented 4 years ago
LynxSetServoEnableCommand was abandoned waiting for ack
LynxFailSafeCommand was abandoned waiting for ack

Well it certainly seems like you have a 485 bus comms problem here.... If you connect your ExH to your CH over USB instead of 485, does the problem go away?

Milotrince commented 4 years ago

Redoing the configuration solved my issue. looking at the XML file I was using, there was actually a duplicate entry for the servo.