Unable to create a log file with Advantagekit

I tried using AvantageKit and AdvantageScope to log, I managed to see all the logged info while live connected to the roborio. my guess is that the log folder I define here:
“Logger.getInstance().addDataReceiver(new WPILOGWriter(”/media/sda1/“));”
can’t be found.

Do you have a FAT32 formatted USB stick plugged into the Rio? Typically the location of that is /u/, which is a symlink to the USB stick actual mount location; if you don’t have a USB stick plugged in, /home/lvuser/ is the home directory where your robot code is running.

Note neither of these will work when running on desktop in simulation. For the /home/lvuser case, you can get an equivalent directory in both simulation and on the robot with Filesystem.getOperatingDirectory(), or you can do something similar to its code (check RobotBase.isReal() to do something different between Rio and sim).

I managed to see the logs. Thanks for the fast reply and help!

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