by Bullit » Fri Jul 10, 2009 6:47 pm
by Bullit
Fri Jul 10, 2009 6:47 pm
Perhaps you don't know this but when you send a different speed to the Ax-12 you are also sending a different torque.
If you want to do things the way the CM-5 motion engine does them then you send a sync_write which goes to all servos and synchronizes motion. The CM-5 motion engine sets torque to maximum (which also means speed is set to maximum as they are directly related) then it sends CWSlope, CCWSlope and goal position to each servo as a single sync_write but this is updated many times between poses. The idea is that the servos all maintain a fixed torque throughout the motion, matching speed of the servos in done by taking many small steps between any two poses and therefore the speed is simply the derivitive of the posiiton. The time it takes to move from one pose to the next is controlled by the time it takes to get the servo that has the furthest to move to its destination at the speed requested. All other servos are scaled to complete their moves at the same time.
So if you are planning on updating 18 servos with a sync_write, lets say speed and goal then each servo cost 5 bytes with a packet overhead of 5 bytes, I think, so thats 5[bytes per servo]x18[servos]+5[bytes packet overhead]*10[bits per byte] = 950 bits per packet. At 115k baud you'll only be able to update them every 8.25ms which is close to the CM-5 speed but it doesn't allow for you to read back anything, you've already used up all your time in the serial transport at 115k baud.
Perhaps you don't know this but when you send a different speed to the Ax-12 you are also sending a different torque.
If you want to do things the way the CM-5 motion engine does them then you send a sync_write which goes to all servos and synchronizes motion. The CM-5 motion engine sets torque to maximum (which also means speed is set to maximum as they are directly related) then it sends CWSlope, CCWSlope and goal position to each servo as a single sync_write but this is updated many times between poses. The idea is that the servos all maintain a fixed torque throughout the motion, matching speed of the servos in done by taking many small steps between any two poses and therefore the speed is simply the derivitive of the posiiton. The time it takes to move from one pose to the next is controlled by the time it takes to get the servo that has the furthest to move to its destination at the speed requested. All other servos are scaled to complete their moves at the same time.
So if you are planning on updating 18 servos with a sync_write, lets say speed and goal then each servo cost 5 bytes with a packet overhead of 5 bytes, I think, so thats 5[bytes per servo]x18[servos]+5[bytes packet overhead]*10[bits per byte] = 950 bits per packet. At 115k baud you'll only be able to update them every 8.25ms which is close to the CM-5 speed but it doesn't allow for you to read back anything, you've already used up all your time in the serial transport at 115k baud.