Just to set up this conversation; the way I've learned the AutoPosition control it's basic setup is: *You set an image of your robot. *Create a frame and name it. *In this Frame you add servos (or virtual servos) to each joint needing control. *Then in this frame you move the wanted servos with the port setting to the needed positions and, thus pose the robot for a single movement. *Hit the save button in the lower left corner.
- Then you repeat by making and naming a new frames and create a new single movement poses. *Now you should have a set of different poses called Frames. *Next to create a fluid dance; In the Action tab you then string the single frames together you created for each pose into the fluid moment or "Action" your looking to create.
Now my question; Can I add a script to each Frame I make? Considering there are two different sections of the AP control to create movement (Frames and Actions), I was under the impression that we could add a script to each frame in a AutoPosition control. I can only find a way to add scripts to each Action in the AP control. I also found in the Settings tab a way to add a script to run when the entire AP starts to move and also run another script when it stops.
I ask this because I am trying to control a set of arms on my robot with a single AP control. Each of the two arms consists of 3 servos and a DC motor (DC motor has feedback to a Kangaroo X2 using a EZB Uart port and simple serial commands). I'm trying to control the DC motors in the AP by assigning a Virtual servo to each of them in each Frame I create. I have a script written that watches these Virtual Servos to start moving. I then reads the position and then sends the speed and position serial commands to the Kangaroo so it (and the Sabertooth) can move the DC motor. I have this script running, watching and waiting for a Virtual Servos move but have it located outside the AP in an EZ Script. This complicates the settings for multiple moves to different positions of the DC motor and I'm having trouble conceiving a method or script that would let this one script located outside the AP frame transmit different position and speed settings to the Kangaroo. If I could attach a single script to each Frame in this AP I could place the position and speed commands for the Roo in there. I'm really hoping to use virtual servos for these DC motors and let the AP time them along with other hoped for benefits.
Am I missing something here or is there a better way to do this? Thanks in advanceSkip to comments