Skip to content

Commit 291b0d5

Browse files
committed
Changed back sign of alpha to be like before. I made a mistake in previous commit.
1 parent ccc9895 commit 291b0d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PathTracking/move_to_pose/move_to_pose.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# simulation parameters
1717
Kp_rho = 9
18-
Kp_alpha = -18
18+
Kp_alpha = 18
1919
Kp_beta = -3
2020
dt = 0.01
2121

@@ -53,7 +53,7 @@ def move_to_pose(x_start, y_start, theta_start, x_goal, y_goal, theta_goal):
5353
# from 0 rad to 2*pi rad with slight turn
5454

5555
rho = np.hypot(x_diff, y_diff)
56-
alpha = (theta - np.arctan2(y_diff, x_diff)
56+
alpha = (np.arctan2(y_diff, x_diff) - theta
5757
+ np.pi) % (2 * np.pi) - np.pi
5858
beta = (theta_goal - theta + np.pi) % (2 * np.pi) - np.pi
5959

0 commit comments

Comments
 (0)