Skip to content

Commit

Permalink
Fixed assert on time validity
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Dafarra authored Aug 24, 2022
1 parent 9e116ac commit dff2890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/UnicyclePlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ bool UnicyclePlanner::getIntegratorSolution(double time, UnicycleState &unicycle

double initialTime = fullSolution.front().time;

assert(time > initialTime && time < fullSolution.back().time && "Error while retrieving the integrator solution. Time out of bounds.");
assert(time >= initialTime && time <= fullSolution.back().time && "Error while retrieving the integrator solution. Time out of bounds.");

size_t index = static_cast<size_t>(std::round((time - initialTime)/m_integrator.maximumStepSize()));
index = std::min(index, fullSolution.size() - 1);
Expand Down

0 comments on commit dff2890

Please sign in to comment.