-
Notifications
You must be signed in to change notification settings - Fork 0
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
Not allow anti rotation in current mode #2
Comments
Hello,
Are you maybe using int16 instead of uint16 to send the current to the Write blocks? Please note that Dynamixel handles these values as unsigned integers, so uint16 needs to be used for the current (since it is 2 bytes).
Best Regards,
Georgios Andrikopoulos
***@***.***
Georgios Andrikopoulos
Assistant Professor in Mechatronics with focus on Robot Design
KTH Royal Institute of Technology
Engineering Design Department / Mechatronics Unit / Robot Design Laboratory
Brinnellvägen 83, SE-114 28 Stockholm, Sweden
Phone: +46-8-790 63 31
***@***.******@***.***>, https://www.kth.se/profile/geoand?l=en
From: hhcheng13 ***@***.***>
Sent: Thursday, April 18, 2024 7:08 PM
To: geoand-robotdesign/Dynamixel_Library_MATLAB_Simulink ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [geoand-robotdesign/Dynamixel_Library_MATLAB_Simulink] Not allow anti rotation in current mode (Issue #2)
It does not allow to send the negative current in current control mode. It return: Error using calllib Value exceeds the legal range for the data type.
—
Reply to this email directly, view it on GitHub<#2>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AZEBEVKXLDFKUHP2EHYCYM3Y574XDAVCNFSM6AAAAABGNWAEQOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TCMJXGM2TQOI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Thanks for the reply=). I am not sure if I do it correctly. I use the SyncReadSyncWrite.m and modify the group_num_write = initSyncWriteDxl(lib_name, port_num, protocol_version,... into group_num_write = initSyncWriteDxl(lib_name, port_num, protocol_version,... Then it returns "Value exceeds the legal range for the data type." |
Hello,
From the code snippet you provided, I see that group_num_write(1) becomes group_num_write(2), although index 2 belongs to velocity in your code. Please try group_num_write(3), which corresponds to current, and see if that fixes the issue.
I cannot see anything else wrong, from what I understand you are trying to send the value -5 to all motors, which should be well within the [-Current Limit, +Current Limit] range set by default in most (if not all) Dynamixel models. Checking your motors in Dynamixel Wizard should verify whether you are indeed in range.
If the issue persists, I will need more information about which motor you are using, to see if my team can replicate the error and provide more assistance.
…--
Best Regards
Georgios
<tel:+4687906331>
________________________________
From: hhcheng13 ***@***.***>
Sent: Friday, April 19, 2024 4:54:32 pm
To: geoand-robotdesign/Dynamixel_Library_MATLAB_Simulink ***@***.***>
Cc: Georgios Andrikopoulos ***@***.***>; Comment ***@***.***>
Subject: Re: [geoand-robotdesign/Dynamixel_Library_MATLAB_Simulink] Not allow anti rotation in current mode (Issue #2)
Thanks for the reply=). I am not sure if I do it correctly. I use the SyncReadSyncWrite.m and modify the
group_num_write = initSyncWriteDxl(lib_name, port_num, protocol_version,...
motor_models, ["Goal Position"; "Goal Velocity"]);
...
syncWriteDxl(lib_name, group_num_write(1), motor_IDs, motor_models, ...
data, 'Goal Position')
into
group_num_write = initSyncWriteDxl(lib_name, port_num, protocol_version,...
motor_models, ["Goal Position"; "Goal Velocity"; "Goal Current"]);
...
syncWriteDxl(lib_name, group_num_write(2), motor_IDs, motor_models, ...
-5*ones(numel(motor_IDs),1), 'Goal Current')
Then it returns "Value exceeds the legal range for the data type."
—
Reply to this email directly, view it on GitHub<#2 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AZEBEVMAM62WEIRF5GOYSHTY6EV2LAVCNFSM6AAAAABGNWAEQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRWG42TANRZGQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
It does not allow to send the negative current in current control mode. It return: Error using calllib Value exceeds the legal range for the data type.
The text was updated successfully, but these errors were encountered: