Skip to content

Add URCL and refactor CANIDs into an enum#123

Open
ErikCald wants to merge 1 commit intomainfrom
Erik-REVLogger
Open

Add URCL and refactor CANIDs into an enum#123
ErikCald wants to merge 1 commit intomainfrom
Erik-REVLogger

Conversation

@ErikCald
Copy link
Collaborator

@ErikCald ErikCald commented Apr 12, 2024

Describe your changes

Hardware has been asking for more logging of sparkmax data. So this PR is for Brian. URCL will be the easiest way to make sure they can get as much data logged as possible without them needing to constantly ask software to add a new log entry.

URCL is the unofficial rev-compatible logger. It will automatically publish all rev can status frames to network tables which is then logged by the WPILib logger.

Tested on Apollo at MVS. Tested with and without for 3 minutes each. Without URCL, the log file was 4 MB large. With URCL, it was 8 MB large. Based on this test, it will double the size of our logs files but it is still very manageable on a USB stick.

  • Added URCL vendordeps
  • Started URCL in robotInit right after the WPILib logger
  • Refactored can ids into an enum class in order to easily create a Map that maps can id integers to motor controller names.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • I have tested thoroughly.
  • I have written documentation and explained about my changes to the best of my ability.

@ErikCald ErikCald self-assigned this Apr 12, 2024
@weizhang-2706
Copy link
Contributor

My only concern is that this may impact performance during competitions due to many CAN status frames and writing to USB stick.
We can definitely use it during debug and may only focus on some which need this log.

@ErikCald
Copy link
Collaborator Author

URCL is only logging the can periodic status frames that are already sent to the RIO so it won't cause any extra can bus utilization.

URCL claims it needs less than 80 micro seconds each robot cycle so it also doesn't cost much for RIO usage.

And I highly recommend running it at competition because it doesn't cost much in resources but gives hardware team 95% of the logging they want to see.

@weizhang-2706
Copy link
Contributor

I am a little worried about writing to the USB stick.
We will put it in our regular debugging routine and monitor any possible issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants