You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * The total time the trajectory will take to follow * * @return The total time the trajectory will take to follow, if empty will * return 0 seconds.*/
units::second_tGetTotalTime() const {
if (samples.size() == 0) {
return 0_s;
}
returnGetFinalSample().GetTimestamp();
}
Code which uses GetTotalTime (or SampleAt, which calls into GetTotalTime) breaks due to the return statement in this method. GetFinalSample returns an optional so it should read
return GetFinalSample().value().GetTimestamp();
The optional doesn't need to be checked since the method already verifies that the trajectory isn't empty.
I would submit a PR but I don't have the bandwidth right now to set up an entire testing environment just to add 8 characters to a file, so I apologize.
The text was updated successfully, but these errors were encountered:
calcmogul
added a commit
to calcmogul/Choreo
that referenced
this issue
Jan 15, 2025
In
Trajectory.h
Code which uses GetTotalTime (or SampleAt, which calls into GetTotalTime) breaks due to the return statement in this method. GetFinalSample returns an optional so it should read
return GetFinalSample().value().GetTimestamp();
The optional doesn't need to be checked since the method already verifies that the trajectory isn't empty.
I would submit a PR but I don't have the bandwidth right now to set up an entire testing environment just to add 8 characters to a file, so I apologize.
The text was updated successfully, but these errors were encountered: