fxmech
USA
Asked
Resolved by DJ Sures!
How would you approach controlling travel speed on a Dynamixel (400 Series) servo when not using Autoposition? I tried setting ServoSpeed prior to calling a servo move command but it doesnt seem to work. Does it need to be done manually in a script using for-to loops and pauses? I could create a loop that takes you from point A to point be in increments rather than a single goto the endpoint command. That along with a pause between increments should do the job, but since AutoPosition has that built in, I thought maybe there was already a skill available to do it with. I can also try setting parameters onto the servo itself using the Dynamixel wizard, but was hoping to find a way within ARC.
Related Hardware OpenCM 9.04
Related Controls
Servo Speed
Dynamixel
Use the servo speed command in your script. I prefer JavaScript so here’s the link to the manual page: https://synthiam.com/Support/javascript-api/Servo/setSpeed
set the speed prior to moving the servo
It took me a bit to get comfortable with the javascript, but I finally got this to work as well as my EZScript version but still no control over speed. Here is my code:
I tried moving the set speed lines in and out of the while loop. I also tried changing the speed value from 10 to 1 but the servos move full speed every time.
I also copied the example code for the init script inside the Connection skill. I am running 3 dynamixel XH430-W350-R IDs 1,2 & 3 on openCM with expansion board on Port 0... The servos do move just really fast.
The code in the init script is:
any ideas?
Here is the ARC project so far evelynNoKey.EZB
I tested and the servo speed seems to work for me. Try using the latest dynamixel plugin and enable debug mode. Check the log to see if the servo speed commands are being acknowledged.
That is very strange... I will try it on Monday and also try doing a factory reboot on the motors just in case...
I went ahead and did a few things...
Sadly nothing changed and the servos continue to move at full speed no matter what number (1-10) servo speed was set to. The only way I was able to slow them down was by bypassing the Speed function altogether and doing something like this:
David, just saw your email last night and shot you off a reply last night, but looks like you are ontrack now.
What is strange is that I also grabbed a couple of XM540 servos and they behaved exactly the same as the others... Here is a video of the issue
That is weird. I've never tried adjusting the servo speed on a dynamixel in a script before, but that is definitely the same speed.
We did find out the hard way that Robotis, changed the protocols on various servo models...not sure why...my results varied from series to series..I.E. some did not function at all using the dynamixel skill. There is a hack night somewhere as you can see DJ working through and showing they changed the protocols.
What dynamixel model servos are you using for the neck? They may have changed the protocol for the speed on the servos.
I'm using XH430-W350-R but I tried it with some 500 series as well and got the same results. I thought the speed command was just creating a delay loop to slow the servos down, If they are accessing the dynamixel parameters to do so, I would love to see the skill allow for access to acceleration and velocity settings so that we could dampen the servos start and end points. I do this all of the time outside of ARC and it makes all of the difference in the world.... All of the vibrations and jerkiness can be tuned out and super smooth results can be easily achieved.
DJ, what servos were you using in order to get the speed command to work? I have almost every type of X series dynamixel here... I can switch and duplicate your setup
I dont have those servos but you could try running without the port setting: servo.SetSpeed(port, speed) Or try running this code in ezscript just to debug:
Use the latest version of the dynamixel robot skill: https://synthiam.com/Support/Skills/Servo/Dynamixel?id=16142
It has new control commands that allow writing directly to the servo's RAM using the control table. Read the manual section for the robot skill that provides a link to view the control tables for each servo.
If you're able to find a control table address that works for servo speed or acceleration, let me know and I'll update the robot skill accordingly.
I'd like to add a global acceleration parameter to ARC so any servos supporting it would be compatible.
Ok thanks, I just tried V42 and it wasn't working for me.. I think maybe the data isn't being sent as a 32bit number forX400-500 series motors. I'm addressing the issue in more detail under the comments for the new Dynamixel Skill. https://synthiam.com/Support/Skills/Servo/Dynamixel?id=16142
Calling this one resolved by the latest awesome update to the dynamixel library V43!