Shop OBEX P1 Docs P2 Docs Learn Events
Drive s2 in mm/s - Page 2 — Parallax Forums

Drive s2 in mm/s

2»

Comments

  • GwolfeGwolfe Posts: 28
    edited 2012-06-28 20:59
    Still working on my code. I'll post it soon. Meanwhile, this attachment may help.

    Matt
  • GwolfeGwolfe Posts: 28
    edited 2012-07-12 19:52
    Some projects are never actually done. You just keep tweaking and reworking them, so you have to call them done at some intermediate point. After spending some time trying to implement ramping without producing anything satisfactory, I'm posting the code for the s2mms driver in its current state. In addition to ramping, continuous and immediate mode are not implemented. It doesn't read and process the idler information or give a meaningful status update. Its not yet integrated back into the original s2 object. I have written a couple spin routines to call the driver, and using VPython have written the graphical GUI's that my students will use to "program" the robot. So its done in the sense that I could use it successfully in class tommorrow if the school year were starting now.

    Since the motor driver produces acceleration, the most successful ramping behavior has been to simply to make an additional call to the driver from spin to produce a ramping acceleration for a short time period. I'm thinking I may just leave it that way. I will produce some examples, but otherwise it will be up to the user of the driver to insert ramping motion segments at the spin (or higher) level.

    I hope some of you will be interested enough to read and test it, and send along some feedback, bug reports, suggestions, etc.

    Matt

    s2mms.spin
  • GwolfeGwolfe Posts: 28
    edited 2012-07-12 20:13
    I've written the position vs. time and velocity vs. time graph GUI's using VPython, simply because it was a language I was already familiar with. There are probable many better choices, but it works. To use this, you would have to install Python and Visual by following the instructions at www.vpython.org, then put the propellent dll library, the lg_scribbler.tga image (attached) and the FloatMath.spin file (I haven't figured out how to point propellent to the libraries yet.) in the same directory as s2mms.spin (previous post) and the python files. I've also included screen shots. The operation is simple. You drag a line segment from the blue bar at the top, adjust its end points, add and adjust additional line segments as needed, then click on the scribbler icon to send it to the robot through the USB com port.
    V_vs_T_GUI.PNG
    P_vs_T_GUI.PNG
    Measured several different ways, the motion of the robot is very close to that specified by the graphs.

    s2mms_GUIs.zip
    800 x 401 - 39K
    799 x 396 - 39K
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-07-12 20:19
    I think it will take .zip files. This looks very interesting, thanks for sharing.
  • GwolfeGwolfe Posts: 28
    edited 2012-07-13 03:36
    Thanks. Just posted the GUI code above.
Sign In or Register to comment.