Hello All,
I am using a Dynamixel MX-28AT(2.0) servos.
I wish to control the servos using some mathematical equations. The position for the motors are generated by these kinematic equations. My question is how to write the code so that I can command the servo to finish the motion in specified time.
Eg : alpha = alpha_0 /(2tanh(2.7)) * tanh(2.7sin(2pif*t)) ;
here alpha_0 is a constant , f - frequency of the cycle and t is the time step at which the positions are being updated.
How do I calculate the time step size so that the motors will follow same frequency of motion as that of the equations.
Using servo.writeMicroseconds() instead of servo.write() will give you finer control over the servo position assuming that the servo is up to it mechanically
I hope that it goes without saying that if you are intending to move more than one servo at a time then delay() must not be used
Thanks for replying , but servo.write() is a command. I am asking regarding the positions or points that need to be given to servo.write() so that I can achieve the given motion in a specific time period.
And ya I am using 3 motors connected in series.
The PWM signal resolution is determined by the timer settings. The servo reaction in time is subject to torque, acceleration and possibly more parameters.
Ya I got you. But like I said earlier I am not giving the final position directly instead am giving the position values from the equations.
So if I want to make the servos follow the same frequency (time period) as that of the equations how can I achieve that ? And how can I code that way. Please direct me in this path.
I am just a beginner level but working on this specific problem. So I will be lost if you throw so many parameters at me.
Is there any standard scaling rule to achieve required motion in position control mode
depending on the output motion of servos. As I need to vary the frequencies in the equation and also make servos to follow the same motion along with the same time period.
you're using an advanced high-end and expensive ($289) device
a typical RC servo used in a robotics application is driven by a 1-2 msec pulse. using servo.write() which proportionally positions the angle of the servo arm
The equipment may be high end but am just a beginner with basic level skills. And am stuck with this issue of position control.
Can you direct me to some sources where position control is being done using such kinematic equations?