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

4310 sudden movement bug fix #75

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

4310 sudden movement bug fix #75

wants to merge 1 commit into from

Conversation

rickxu2
Copy link
Collaborator

@rickxu2 rickxu2 commented Jul 28, 2024

  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
Copy link
Collaborator

ywh114 commented Aug 2, 2024

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.

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