WPILib cannot access logs

We are getting datalog writing errors and I can’t figure out why. I’m curious if we are missing a step when imaging and setting up the roboRio?

Here are the steps we took:

  1. Re-imaged the roborio to FRC_roboRIO_2024_v2.1
  2. Format a USB stick to be FAT32
  3. On the USB Stick create a U folder, then create a logs folder (/U/logs)
  4. To be safe I also created a logs folder in the root directory (/logs)
  5. Plug USB Stick into USB port of roboRio
  6. Deploy robot code

Then we get these errors:

DataLog: Could not open log file '/U/logs/Log_975979bb69162699.wpilog': No such file or directory
DataLog: Could not open log file '/U/logs/wpilog_a659b9492f4a3775.wpilog': No such file or directory
DataLog: Could not open log file '/U/logs/wpilog_0eb428e76b43aee8.wpilog': No such file or directory
DataLog: Could not open log file '/U/logs/wpilog_a3ca74cd236ea041.wpilog': No such file or directory
DataLog: Could not open log file '/U/logs/wpilog_aae3f90d7fed2b1b.wpilog': No such file or directory
DataLog: Could not open log file, no log being saved

Our code: https://github.com/Team293/Crescendo/tree/20-install-advantagekit

RoboRio info:
image

Here are the full logs:
DataLog_Error.json (18.6 KB)
DataLog_error.txt (7.0 KB)

Thanks

I believe the usb drive automatically gets mounted with a symlink to /U/.

You shouldn’t have to create any directories on the flash drive. Try SSH-ing into the roborio to make sure the file structure is what you’re expecting.

1 Like

OK We will do that. In the meantime is there anything else special that we need to do when re-imaging a roboRio?

You shouldn’t have to. When you call DataLongManager.start(), you can pass it a string argument with your desired directory “/U/logs”

see: DataLogManager (WPILib API 2024.2.1)

Sorry, one important bit of information I left out:
We are using the latest AdvantageKit so there is no DataLogManager.start().
We started from the swervedrive example.

After reimaging the roboRio again and formatting the USB it now works.

Actually we are still having this issue. Does anyone know about this or perhaps has experienced this as well?

What brand of USB are you using? It might be that the USB is not recognized when connected to the roboRIO. I had tried a Samsung 64GB USB a few weeks ago that was formatted to FAT32, but the roboRIO could not recognize it, so I switched to a smaller generic 8GB USB with no issues.

1 Like

Thank you for the tip jdao. I think we’ve actually fixed the issue now.

When initializing the robot, and setting up the logger, we have not seen the issue if we specifically state where the log directory is. For example:

// Check if the log directory exists
var directory = new File(LOG_DIRECTORY);
if (!directory.exists()) {
  directory.mkdir();
}

and then shortly after:

Logger.addDataReceiver(new WPILOGWriter(LOG_DIRECTORY));

We have tried to “break” it many times now, (hard power off, disabling the bot under heavy movement and use), and not seen the same errors being reported!

We problem that it was intermittently working. We were using some offbrand USB thumb drive. bought these 64 GB sandisk drives off Amazon and they’re working fine the past 2 days.
https://a.co/d/fwFBubp

I wish I had bought the 32 GB instead. Come to find out the RoboRio only supports FAT32. And fat 32 is supported in windows only up to 32 GB. So I had issues just trying to format it to FAT32. I ended up using disk management in windows to partition only 32 GB of the 64.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.