Skip to content

Commit

Permalink
Don't apply max velocity constraint to end point (#466)
Browse files Browse the repository at this point in the history
i <= endIdx would apply the velocity constraint to the segment after the endIdx waypoint, which not intended.
  • Loading branch information
bruingineer authored Apr 26, 2024
1 parent 7797e3c commit 14948bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/document/HolonomicPathStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ export const HolonomicPathStore = types

// Check if current waypoint "i" is within the scope of this constraint
if (startIdx !== undefined && endIdx !== undefined) {
if (i >= startIdx && i <= endIdx) {
if (i >= startIdx && i < endIdx) {
if (constraint.velocity !== undefined) {
maxVel = Math.min(maxVel, constraint.velocity);
}
Expand Down

0 comments on commit 14948bc

Please sign in to comment.