Skip to content

Reversing needs to choose the right signs for articulation as acos is…#2

Merged
zeerekahmad merged 6 commits intomainfrom
zeerekahmad/fix_reversing_issues
Mar 18, 2026
Merged

Reversing needs to choose the right signs for articulation as acos is…#2
zeerekahmad merged 6 commits intomainfrom
zeerekahmad/fix_reversing_issues

Conversation

@zeerekahmad
Copy link
Contributor

@zeerekahmad zeerekahmad commented Mar 17, 2026

The articulated controller is not properly accounting for the ambiguity of acos(x) which is has multiple sign branches. This leads to a bad outcome for reversing data.

The bicycle controller is using atan2 instead of tan, which gives data in the wrong quadrant when reversing resulting in bad data. We need to be between -pi/2 and pi/2 rather than between -pi and pi. Tangent is the more correct use here.

The corrected versions seem to have reasonably correct steering angles relative
image

… multivalued and we didn't properly account for the sign there. For bicycle controller we should be using tan i nstead of atan2 as we want to be between -pi/2 and pi/2 and not in all 4 quadrants with atan2
@zeerekahmad zeerekahmad merged commit b98551e into main Mar 18, 2026
4 checks passed
@zeerekahmad zeerekahmad deleted the zeerekahmad/fix_reversing_issues branch March 18, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants