-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AdvantageKit abnormal CAN spiking #71
Comments
Looking at the data from your post here, I'm not clear on what the issue is. The log from your base project shows a median CAN usage of 42%, and the log from your AdvantageKit only project shows a median CAN usage of 38%. There are occasional jumps, but this is normal for CAN utilization measurements. There aren't any conditions where AdvantageKit will write to the CAN bus such that it would increase utilization. The only interaction is the PDP/PDH logging, which reads frames that are already being transmitted. It seems likely that YAGSL is configuring devices in a way that changes CAN utilization (which would be expected while setting up devices), but I don't see a connection to AdvantageKit here. |
The thing is, we're noticing CAN utilization jumps only when AKit is running on the robot. Blank projects or projects with only YAGSL don't exhibit the same CAN spikes, even when on and running code (i.e. driving). That would seem to suggest AKit is either changing the RIO's CAN utilization measurement system somehow or affecting CAN utilization. I'm not familiar, so, does AKit modify how the RIO logs CAN utilization in any way? |
Regardless of the cause, the spikes in utilization are definitely issues with the measurement only and won't affect the operation of the CAN bus (there used to be a similar issue on the RIO when the sampling was incorrect). Given that AdvantageKit is reading the CAN utilization periodically for logging, one possibility is that there is a bug in netcomm where polling for the CAN status affects the samples (e.g. it's sampling between calls to the read method, or something similar). You could test that by taking your blank robot project and adding |
I just tested in a blank WPILib project either not calling |
I reduced the rate of polling CAN utilization, which should reduce the noise in the measurements. |
Sorry for the late response, I haven't been in recently to work on the robot, I'll be sure to play around with the changes when I get the time today. Thank you for your help! |
Recently we've noticed that our CAN usage on our robot would spike up to 100% usage with no explanation. We've ran some tests with isolating just AdvantageKit on a new project, and found that with just AdvantageKit installed, whether if we enable logging or not inside our Robot.java file, the can would still have that abnormal spike.
More information to what I'm talking about can be found here on the Chief post I made yesterday.
The text was updated successfully, but these errors were encountered: