Moving multiple servos in synch - Found an example
I had posted a while back about my struggles to synchronize multiple servos with the PSC-USB. I stumbled across a Lynxmotion product today that implements EXACTLY what I was looking for in those posts·- and it looks like it was done to achieve the goal (complex gait synchronization) that I was experimenting with.
I hope you'll consider adding this kind of feature to your enhancements list as I think it will be more and more common as servos and batteries make walkers easier and cheaper to build.
The ultimate controller for this purpose would have a combination of the features described below and the Pico Servio's ability to store gait patterns (sequences) through its base API (instead of through firmware updates as in the Lynxmotion product).
This is very exciting...
See excerpt from the document, which is located at:
http://www.lynxmotion.com/images/data/ssc-32v2.pdf
**********************************************************
The example will move servo 5 to position 1600 and servo 10 to position 750. It will take 2.5 seconds to complete the move, even if one servo has farther to travel than another. The servos will both start and stop moving at the same time. This is a very powerful command. By commanding all of the legs in a walking robot with the Group Move it is easy to synchronize complex gaits. The same synchronized motion can benefit the control of a robotic armas well.
You can combine the speed and time commands if desired. The speed for each servo will be calculated according to the following rules:
1. All channels will start and end the move simultaneously.
2. If a speed is specified for a servo, it will not move any faster than the speed specified (but it might move slower if the time command requires).
3. If a time is specified for the move, then the move will take at least the amount of time specified (but might take longer if the speed command requires).
Servo Move Example: "#5 P1600 #17 P750 S500 #2 P2250 T2000 <cr>"
The example provides 1600uS on ch5, 750uS on ch17, and 2250uS on ch2. The entire move will take at least 2 seconds, but ch17 will not move faster than 500uS per second. The actual time for the move will depend on the initial pulse width for ch17. Suppose ch17 starts at position 2000. Then it has to move 1250uS. Since it is limited to 500uS per second, it will require at least 2.5 seconds, so the entire move will take 2.5 seconds. On the other hand, if ch17 starts at position 1000, it only needs to move 250uS, which it can do in 0.5 seconds, so the entire move will take 2 seconds.
I hope you'll consider adding this kind of feature to your enhancements list as I think it will be more and more common as servos and batteries make walkers easier and cheaper to build.
The ultimate controller for this purpose would have a combination of the features described below and the Pico Servio's ability to store gait patterns (sequences) through its base API (instead of through firmware updates as in the Lynxmotion product).
This is very exciting...
See excerpt from the document, which is located at:
http://www.lynxmotion.com/images/data/ssc-32v2.pdf
**********************************************************
The example will move servo 5 to position 1600 and servo 10 to position 750. It will take 2.5 seconds to complete the move, even if one servo has farther to travel than another. The servos will both start and stop moving at the same time. This is a very powerful command. By commanding all of the legs in a walking robot with the Group Move it is easy to synchronize complex gaits. The same synchronized motion can benefit the control of a robotic armas well.
You can combine the speed and time commands if desired. The speed for each servo will be calculated according to the following rules:
1. All channels will start and end the move simultaneously.
2. If a speed is specified for a servo, it will not move any faster than the speed specified (but it might move slower if the time command requires).
3. If a time is specified for the move, then the move will take at least the amount of time specified (but might take longer if the speed command requires).
Servo Move Example: "#5 P1600 #17 P750 S500 #2 P2250 T2000 <cr>"
The example provides 1600uS on ch5, 750uS on ch17, and 2250uS on ch2. The entire move will take at least 2 seconds, but ch17 will not move faster than 500uS per second. The actual time for the move will depend on the initial pulse width for ch17. Suppose ch17 starts at position 2000. Then it has to move 1250uS. Since it is limited to 500uS per second, it will require at least 2.5 seconds, so the entire move will take 2.5 seconds. On the other hand, if ch17 starts at position 1000, it only needs to move 250uS, which it can do in 0.5 seconds, so the entire move will take 2 seconds.