Skip to content

Commit

Permalink
Differential Drive Guidance
Browse files Browse the repository at this point in the history
  • Loading branch information
PerFrivik committed Dec 5, 2023
1 parent f2b00d4 commit 4fb5f9c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ float DifferentialDriveGuidance::computeAdvancedBearing(const matrix::Vector2f &
float path_dot_product = wanted_path_normalized.dot(current_path_normalized);
float theta = acos(path_dot_product);

matrix::Vector2f new_waypoint = waypoint - (current_pos - (wanted_path_normalized * cos(theta) * current_path.norm() + previous_waypoint));
matrix::Vector2f new_waypoint = waypoint - (current_pos - (wanted_path_normalized * cos(
theta) * current_path.norm() + previous_waypoint));

return computeBearing(current_pos, new_waypoint);
}
Expand Down

0 comments on commit 4fb5f9c

Please sign in to comment.