Skip to content

Rotate directly towards the immediate target#149

Merged
mxgrey merged 2 commits intomainfrom
fix_rotation_towards_target
Jun 11, 2025
Merged

Rotate directly towards the immediate target#149
mxgrey merged 2 commits intomainfrom
fix_rotation_towards_target

Conversation

@mxgrey
Copy link
Copy Markdown
Collaborator

@mxgrey mxgrey commented Jun 11, 2025

This is simple fix for a flaw in the logic for orienting the robot towards its target. On main the calculation was being biased by the goal orientation of the target. In other words, when the robot needs to rotate to start driving towards its target, it will choose an orientation that is closest to the goal orientation of that target, even though the goal orientation of the target has nothing to do with what direction the robot should face in order to drive towards the target.

This flaw was one factor in the excessive rotations shown in this video.

I suspect this has been a cause of many inexplicable unnecessary rotations that we've seen the slotcars perform while reversible was true.

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Copy link
Copy Markdown
Member

@luca-della-vedova luca-della-vedova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks for digging this up and fixing it! That issue has been around for so long that I almost stopped seeing it

@mxgrey mxgrey merged commit e161abf into main Jun 11, 2025
4 checks passed
@mxgrey mxgrey deleted the fix_rotation_towards_target branch June 11, 2025 10:24
luca-della-vedova added a commit that referenced this pull request Jun 19, 2025
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Co-authored-by: Luca Della Vedova <lucadv@intrinsic.ai>
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