GestureTweak

-- JonathanKarpick - 20 Mar 2006

A MABLAB based GUI to modify gaits for (private)Stickybot: GestureTweak.zip

Notes:

-- JonathanKarpick - 24 Mar 2006

  • Added plot toolbar so you can zoom, pan, and show datatips. These interfere a bit with the other tools, which won't work if a plot tool is selected. The save button has the same functionality as the "Generate Gait File" button.
  • Added an "Edit Points" button, which pulls up a gimpy table to allow you to hand jam values. Doesn't let you add points, and it will toss out any points at time > period. It will reorder the points so that time is increasing and limit values to between 0 and 255.

GestureTweakScreen.jpg Screenshot-GestureTweak.png Screenshot-Servo.png

Currently works only on gaits for v2.0 firmare/software. (See ServoDriverController).

Usage:

  1. Put the attached .m and .fig files into your working directory.
  2. Ensure you have a matrix representing a v2.0 gait loaded.
    • This is easily done for v2.0 gaits by double-clicking on the .dat file within Matlab and accepting the defaults of the wizard that will pop up.
  3. Enter GestureTweak into Matlab
  4. You can choose between your different gaits via the drop-down list at the bottom of the GUI.
  5. You choose which joint you want to modify via the drop-down list at the top of the GUI.
  6. You can show/hide the points being used to generate the gait by toggling the "Show Points" button on the right side of the GUI. (The button changes to "Hide Points" if you're currently showing points).
  7. Add break-points to the gait by checking the "Add Points" box on the right, and then clicking on the desired new point in the graph window.
  8. Delete existing points by checking the "Delete Points" box on the right, and then clicking on the point you wish to delete. You cannot delete the first or last point.
  9. Move existing points by checking the "Move Points" box on the right, and then clicking on a point you'd like to move. The point will be boxed and the pointer will change to cross-hairs. Select the desired new location of the point. Except for the endpoints, you can change both time and magnitude and the program will re-arrange the remaining points (this should be obvious after playing around with it).
  10. Shift the offset (vertical direction) by clicking the "Shift Offset" button on the right and then clicking on a point in the plot. The pointer will change to crosshairs. Select a point on the plot that represents the distance you'd like to move the plot. The vertical distance between the two clicks defines the offset. The trajectory will get clipped above 255 and below 0.
  11. Shift the phase by clicking on "Shift Phase" on the right and then clicking a point in the plot. The pointer changes to crosshairs. Select a point on the plot that represents the distance you'd like to move the plot. The horizontal distance between the two clicks defines the offset. The trajectory will wrap around automatically.
  12. Copy the current trajectory to another servo by hitting the "Copy to Another Joint..." button. In the window that pops up, select the joint to copy to and hit "Okay." Voila!
  13. Save the gait by hitting the big "Generate Gait File" button. It'll ask you to choose a file to save to. Default actions will generate gaits with up to 255 points and a minimum 20ms step interval.
  14. Using v2.0 of Virgilio's PC software (ServoDriverController), load the gait and send it to SpinyBot in order to run the gait.

Caveats:

  1. Absolutely no "undo" functionality
  2. Can currently only see one joint at a time

Gritty Details:

  1. In the beginning of the m-file, GestureTweak.m, there are a bunch of variables that affect the overall performance of this gui (starting around line 65):
    1. MinTimeStep is the minimum step resolution - servo commands can't be shorter than 20ms...
    2. NumServos is the number of servos. Beware if changing from 12 - this hasn't been tested.
    3. distance is the radius for verify that you're clicking on a point - make it larger if you're having a problem selecting points. Make it smaller if the GUI is selecting goofy points.
    4. resample_points is the largest number of points that will be used for the gait.
    5. slope_range affects how the program picks out line-segments from the original gait
    6. The joint characteristics are detailed following these parameters.

 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback