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

Weird behaviour of getPresentPosition #130

Open
LeonidasEng opened this issue Jul 31, 2023 · 0 comments
Open

Weird behaviour of getPresentPosition #130

LeonidasEng opened this issue Jul 31, 2023 · 0 comments

Comments

@LeonidasEng
Copy link

Hi Robotis,

I am currently using 2 Dynamixel XM430-W210-R servo motors and have encountered a strange issue with getPresentPosition function. Now, this might just be a configuration issue that I have been unable to locate but I'd really appreciate if you could look into this for me. This the first time I've used one of these motors and I would be interested on knowing the cause.

I currently have only one motor attached and I am trying to add a feature that will return the motor to it's home position if it cannot reach the requested position. I have the motor set up in extended position mode. Currently, I don't have a U2D2 so I'm just using the Dynamixel baud rate temporarily and it is displaying values along with some blank characters. My positions with setGoalPosition are 2048, 6144 (1 rotation ) and 10240 (2 rotation). The motor performs these actions. However, with getPresentPosition the raw value is very different from Goal Position. I wanted my motor to move from Position 2048 to 10240 and this is what I got, shown below:

Motor 1 (ID 1) Position: ▒▒▒!Q0.00 | Motor 2 (ID 3) Position 2: ▒▒▒▒52049.00
Motor 1 (ID 1) Position: ▒▒▒!Q0.00 | Motor 2 (ID 3) Position 2: ▒▒▒▒52837.00
Motor 1 (ID 1) Position: ▒▒▒!Q0.00 | Motor 2 (ID 3) Position 2: ▒▒▒▒53848.00
Motor 1 (ID 1) Position: ▒▒▒!Q0.00 | Motor 2 (ID 3) Position 2: ▒▒▒▒54849.00
Motor 1 (ID 1) Position: ▒▒▒!Q0.00 | Motor 2 (ID 3) Position 2: ▒▒▒▒55858.00
Motor 1 (ID 1) Position: ▒▒▒!Q0.00 | Motor 2 (ID 3) Position 2: ▒▒▒▒56883.00
Motor 1 (ID 1) Position: ▒▒▒!Q0.00 | Motor 2 (ID 3) Position 2: ▒▒▒▒57898.00
Motor 1 (ID 1) Position: ▒▒▒!Q0.00 | Motor 2 (ID 3) Position 2: ▒▒▒▒58902.00
Motor 1 (ID 1) Position: ▒▒▒!Q0.00 | Motor 2 (ID 3) Position 2: ▒▒▒▒59910.00
Motor 1 (ID 1) Position: ▒▒▒!Q0.00 | Motor 2 (ID 3) Position 2: ▒▒▒▒510239.00

First of all, why aren't the values on setGoal and getPresent the same? Secondly, you will notice as we progress from zero to 2 rotations. The output abruptly jumps to 510239, which is an increment of around 450000, and that would equate to more than 100 rotations, which is not physically possible in the timeframe suggested by the data. I think it means 61239, is this an integer overflow issue or perhaps just a formatting issue with this function. Any support with this would be greatly appreciated.

Kind Regards,

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

No branches or pull requests

1 participant