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.
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.
Measured several different ways, the motion of the robot is very close to that specified by the graphs.
Comments
Matt
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
s2mms_GUIs.zip