44 std::string_view trajectoryName) {
45 if (trajectoryName.ends_with(TRAJECTORY_FILE_EXTENSION)) {
46 trajectoryName = trajectoryName.substr(
47 0, trajectoryName.size() - TRAJECTORY_FILE_EXTENSION.size());
50 std::string trajectoryFileName = fmt::format(
51 "{}/{}{}", CHOREO_DIR, trajectoryName, TRAJECTORY_FILE_EXTENSION);
53 auto fileBuffer = wpi::MemoryBuffer::GetFile(trajectoryFileName);
55 FRC_ReportError(frc::warn::Warning,
"Could not find trajectory file: {}",
65 }
catch (wpi::json::parse_error&
ex) {
66 FRC_ReportError(frc::warn::Warning,
"Could not parse trajectory file: {}",