Whoops! The title was supposed to be ServoSpeed Questions and Issues Unfortunately you can't change the title so we are stuck with "Questions and Questions", Sorry
@DJ_Sures Lately, I and Mickey666Maus have been working with recording the movements from a virtual robot in 3ds with the purpose of playing them back in ARC. This we can do. The problem comes in the timing. That is to say, the length of time it takes to perform a movement in the 3ds animation vs recreating that same timing in ARC. I can break up a given servo movement command into smaller increments and come up with an approximation of the time needed by fooling with the number of incremental movements and, if needed, add some sleep in between. But that tends to introduce jitter in the actual robot and it defeats the purpose of sending larger servo movement commands to the ARC to achieve smoother movement of the servo. For example:
#Assume we are starting at a servo position of 10 degrees.
Servo(D10,110) #Go to 110 degrees.
#The above command will move the servo smoothly.
#As opposed to:
Servo(D10,10) #Sending out many smaller servo movements.
Servo(D10,12)
Servo(D10,13)
Servo(D10,15)
|
etc.
|
Servo(D10,110)
The smaller increments solve the timing problem, but introduce jitter in the robot.
The obvious answer is to use the ServoSpeed instruction in EZ-Script. The current problem with that is the ServoSpeed has no fine increments between 0 and 1. You essentially go from full speed to less than 1/3 of full speed when going from ServoSpeed(D10,0) to ServoSpeed(D10,1). I did some time trials and found this relationship for the first 6 ServoSpeed numbers:
# To move 179 degrees
# -------------------
#Servo Speed =0 =550ms 1.00x (Base Speed) 3.07 ms/degree 0.326 Degrees/ms
#Servo Speed =1 =1940ms 0.28x (550) 0.28x (Base Speed) 10.84 ms/degree 0.092 Degrees/ms
#Servo Speed =2 =3880ms 0.50x (1940) 0.14x (Base Speed) 21.68 ms/degree 0.046 Degrees/ms
#Servo Speed =3 =5600ms 0.70x (3880) 0.10X (Base Speed) 31.29 ms/degree 0.032 Degrees/ms
#Servo Speed =4 =7400ms 0.76x (5600) 0.07x (Base Speed) 41.34 ms/degree 0.024 Degrees/ms
#Servo Speed =5 =9200ms 0.80x (7400) 0.06x (Base Speed) 51.40 ms/degree 0.019 Degrees/ms
#Servo Speed =6 =11100ms 0.83x (9200) 0.05x (Base Speed) 62.01 ms/degree 0.016 Degrees/ms
As you can see it goes from full speed to 0.28% of full speed at a ServoSpeed of 1. That's a huge difference. The difference is not so much between the rest of the number settings.
All this leads to my question: Would it be feasible to break up the allowed values between 0 and 1 (at least) into finer increments? For example allowing decimal fractional values such as ServoSpeed(D10,1.2). ServoSpeed(D10,1.6) ... etc. ? This, so as to achieve more possible speed values between 0 and 1.
Using decimal fractions would maintain compatibility between the new and the old so no old scripts would be broken by such a modification
Also, a more general question: Is the servo movement operation independent of what is going on in ARC at any given moment. That is to say, is it running on a separate C# thread such that the servo will move at a constant rate regardless of the load on ARC? Within reason, of course.
Thank you.
Ptp is correct - however I would like to reference how the Auto Position control works to aassist in this question. Move every position like you said, but increment larger positions when faster speed is necessary. To smooth out jerkiness, use a servo speed value of 1.
@DJSures We were also figuring that driving the servo movement with ARCs AutoPosition opposed to using EZ-Script might have some effect on getting better results. Would it be possible to make an import function, just like the export function within the AutoPosition of ARC? To generate the code that is needed for import should not be a problem on our side!
Just something that crossed my mind...
There already is an import - you can use an export to save as an .autoposition file and see the format. Then you can generate the xml to have it import.
@DJSures Thanks....I was not aware it is already build in! Sweeeeet!
Let me know if you have any questions regarding the XML .autoposition file. I can help you create an exporter. Or you can simply use the EZ-SDK in your app and populate the AutoPosition Action and Frame classes and export them as XML like so...
*where config == EZ_B.Config.Sub.AutoPositioner
@Dave_Schulpius Thank you for your response. Good to confirm that since it answers a question I had on using a counter as a timer instead of the Sleep instruction.
@DJ_Sures Thank you as well for your posts. The information you provided opens some new and intriguing possibilities. Likewise thanks for your offer to assist on an exporter.
Of course! How stupid of me to not realize that. Forest for the trees kind of thing I guess.Thanks again!
WB, that servo setting info for the auto positioning control helps me also. I sometimes have jitter problems with my B9 robot arms if I try to move them to fast. I've been dealing with servo speed for years now and still struggle at times. Some things just don't come to me easley sometimes.
Servo jitter can mostly be the cause of over powering after market servos (not ezrobot servos). Ezrobot servos are designed for 5-7.4 volt cells. Where aftermarket servos will not generally not support more than 6v. The jitter may be caused by over voltage - which is the most common symptom of aftermarket servos.
If your servos and voltage is within spec, disregard this post - however, keep it in mind for future reference.