Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move_to_pose.py not consistent with book when alpha > pi/2 #877

Closed
qlibp opened this issue Jul 17, 2023 · 2 comments · Fixed by #1168
Closed

move_to_pose.py not consistent with book when alpha > pi/2 #877

qlibp opened this issue Jul 17, 2023 · 2 comments · Fixed by #1168

Comments

@qlibp
Copy link

qlibp commented Jul 17, 2023

Describe the bug
As the book says,

For the case where the goal is behind the robot, that is α ∉ (−pi/2 , pi/2 ], we reverse the vehicle by negating v and γ in the control law

But the implementation here just negate linear velocity.

Expected behavior
I tested with negating both linear velocity & angular velocity, the control vibrates, but the overall trajectory makes more sense than only negating the linear velocity.

Screenshots

  1. Negate Both
    negate_both

  2. Negate only linear velocity
    negate_one

@gongbingyu
Copy link

@qlibp I agree with this view. I have also tried this measure, but there is a vibration situation. Can you tell me how you suppress vibration? Can you share that part of the code?

@Aglargil
Copy link
Contributor

@qlibp I agree with this view. I have also tried this measure, but there is a vibration situation. Can you tell me how you suppress vibration? Can you share that part of the code?

Simply changing the sign of w to -w when alpha > pi/2 or alpha < -pi/2 is not enough, because alpha may jump between -pi and pi at this time, causing the sign of w to also jump, resulting in vibration. Therefore, when alpha > pi/2 or alpha < -pi/2, alpha needs to be recalculated using alpha = angle_mod(np.arctan2(-y_diff, -x_diff) - theta).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants