Skip to content

4310 sudden movement bug fix#75

Merged
ziyiwang54 merged 2 commits into
mainfrom
rickxu2/4310_update
Dec 27, 2025
Merged

4310 sudden movement bug fix#75
ziyiwang54 merged 2 commits into
mainfrom
rickxu2/4310_update

Conversation

@rickxu2

@rickxu2 rickxu2 commented Jul 28, 2024

Copy link
Copy Markdown
Member
  1. Fix the bug for 4310 position read.
    Originally, the position read by 4310 is between -2pi0, but the command that 4310 receives is from -pipi, so if we set 4310 to its current position read, it's possible to see that 4310 will suddenly rotation one full rotation. This is probably because the position data is 16 bits and we are using 16-bit int data type in the code.
    WARNING: This commit only fixes this problem by wrapping the angle received between -P_MAX and P_MAX, and does not try to fix the issue from the basic level.

  2. Allow change in 4310 position feedback range.
    Originally, 4310 feedback range is a constant (-PI~PI). But actually, the range can be changed using dm's PC software. So now there's a second constructor for 4310 motor that allows customized position feedback range.

@ywh114

ywh114 commented Aug 2, 2024

Copy link
Copy Markdown
Collaborator

The new constructor doesn't seem to allow setting P_MIN. I think it should be able to be set, for example to have range 0 - 2pi etc.

@ziyiwang54 ziyiwang54 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@ziyiwang54 ziyiwang54 merged commit 8f35693 into main Dec 27, 2025
1 check failed
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.

3 participants