Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mayarajan3 committed Nov 1, 2024
1 parent 08a2a47 commit cc8ca5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/src/doodlebot/LineFollowing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@ export function followLine(previousLine: Point[], pixels: Point[], delay: number
worldDistance += distanceBetweenPoints(worldPoints[i], worldPoints[i + 1]);
}

// Collect the error between guess and reality
// Collect the error between guess and world
let procrustesResult: ProcrustesResult;
if (previousCommands.length == 0) {
procrustesResult = procrustes(segment1, segment2);
} else if (worldDistance > 0.05) {
// TODO: check if line2 is much smaller than line 1, then use segment1 and segment2. Otherwise, use all the lines
// TODO: check if line 2 is much smaller than line 1, then use segment1 and segment2. Otherwise, use guessLine and worldPoints
procrustesResult = procrustes(guessLine, worldPoints, 0.5);
} else {
// If the current frame doesn't contain that many points, just use previous guess
Expand Down

0 comments on commit cc8ca5c

Please sign in to comment.