-
Notifications
You must be signed in to change notification settings - Fork 7
Errors finding ExpansionHubEx #8
Comments
As for calling init, a recent version of RE2 removed the need. Idk what version that was though. |
@David10238 it looks like it was added in 1.2. I also wonder if the following code is the issue. The comments talk about not wanting to "hotswap" the hardware map if we are in the stop opmode.
UPDATE: Nevermind, this code is running in |
@EddieDL If you connect to the Robot Controller using wireless ADB and watch logcat (filtering for the |
@EddieDL I just tested v1.2 on actual hardware in various different states (e.g. starting the opmode without ExH connected, redeploying RC without hardware connected and then connecting hardware and starting OpMode, etc.) and was not able to reproduce. Is the Hub that you're trying to read from a master or a slave? |
@FROGbots-4634 thanks for the quick response. I can't play with actual hardware today, but I will grab some logs tomorrow. Currently we are only using one ExpansionHub. I am also going to upgrade to SDK 5.3 and see if that changes anything. |
After upgrading to SDK 5.3 things are WAY better. It seems like our real problem had something to do with the SDK not finding the hub in general. We are using an External USB Camera, and there are fixes for that in SDK 5.3. My guess is that resolved this for us. Thanks for your help. |
I'm re-opening this because I've looked at what changed in 5.3 and I can't see any reason why that would fix anything. I think this still needs to be looked into. |
@FROGbots-4634 Just to be clear, we are still having issues. I am just not sure if it is related to using ExpansionHubEx or something else. When I said things were improved in 5.3, I think the thing that helped were the improvements to the way external web cams are handled. We are using two on our competition robot and I think that was perhaps exacerbating this issue. We are still having serious problems with static/disconnects on our robot so we are continuing to investigate this issue. |
@EddieDL the "the improvements to the way external web cams are handled" was nothing more than changing the app to only use 32-bit native libraries (instead of using 64-bit on supported devices...). Furthermore, those native libraries are only used for webcams/Vuforia. They have no impact on Expansion Hubs or MR controllers. |
Two other people have hit this issue, so it appears to not be related to your setup. I may end up pushing a hotfix to revert the automatic swapping, since that seems(?) to be what's causing the issue... |
@FROGbots-4634 I am not sure if you should switch back. We still have this happen, but it is almost always due to starting the RC by plugging it into the robot. Which is easily remedied by restarting the robot. Overall, it is more of a nuisance. Which is probably why I haven't tried rolling back :( I will see if I can test rolling back soon. If others are having significant issues with this, my suggestion would be to do things to address general ESD/connection issues. That seems to have been what REALLY helped us. Below are the specific things we did, which are mostly pretty standard. We just didn't take the time before our first competition :(
|
We get an error casting DcMotorEx to RevExtensionsMotor occasionally |
It seems like there are issues calling
hub = hardwareMap.get(ExpansionHubEx.class, "Expansion Hub 2");
when things aren't "ready". Specifically we receive errors that the device is missing.OpModeType:
LinearOpMode
When call is made: top of
runOpMode()
SDK: 5.2
RevExtensions2: 1.2
Scenario1
If we have just deployed code and we connect the hardware back.
Scenario2
Something causes the Robot Controller to reboot.
Scenario3
You disconnect the USB and connect it again.
Resolution
To fix these issues we terminate the Robot Controller app, disconnect the USB, restart the robot hardware. Start the Robot Controller app and wait for it to be completely up (error showing missing hardware), turn on the robot hardware, connect the USB.
Potential Fix
We noticed that in SDK 5.3 there are some fixes to for the external USB Web Cam. Perhaps if we upgrade to the newer version of the SDK it will resolve this?
We also saw references to calling RevExtensions2
init()
, but they suggest that you no longer need to do this.The text was updated successfully, but these errors were encountered: