40 std::string_view trajectoryName) {
41 if (trajectoryName.ends_with(TRAJECTORY_FILE_EXTENSION)) {
42 trajectoryName = trajectoryName.substr(
43 0, trajectoryName.size() - TRAJECTORY_FILE_EXTENSION.size());
46 std::string trajectoryFileName = fmt::format(
47 "{}/{}{}", CHOREO_DIR, trajectoryName, TRAJECTORY_FILE_EXTENSION);
49 auto fileBuffer = wpi::MemoryBuffer::GetFile(trajectoryFileName);
51 FRC_ReportError(frc::warn::Warning,
"Could not find trajectory file: {}",
61 }
catch (wpi::json::parse_error&
ex) {
62 FRC_ReportError(frc::warn::Warning,
"Could not parse trajectory file: {}",