Shop OBEX P1 Docs P2 Docs Learn Events
S2.Spin — Parallax Forums

S2.Spin

172heavy172heavy Posts: 55
edited 2011-09-20 16:12 in Propeller 1
Is anybody familiar with the S2.SPIN Object? I just need to know what the values default wheel circle and the default wheel space values are? I assume they are the circumference and distance between each wheel?


''-[ Default values ]-
{{ These values are assigned to their respective variables on startup, unless overriding values are stored
in EEPROM. }}

DEFAULT_FULL_CIRCLE = 955
DEFAULT_WHEEL_SPACE = 153
DEFAULT_LIGHT_SCALE = 0
DEFAULT_LINE_THLD = 32
DEFAULT_OBSTACLE_THLD = 1

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-18 11:23
    See the documentation comments in the set_wheel_calibration method for a definition of the full circle and wheel spacing values.

    -Phil
  • 172heavy172heavy Posts: 55
    edited 2011-09-18 14:23
    See the documentation comments in the set_wheel_calibration method for a definition of the full circle and wheel spacing values.

    -Phil

    I found this the first time through, my question is how do I calibrate this thing? do i draw a full circle and measure it what does the wheel spacing mean?
  • 172heavy172heavy Posts: 55
    edited 2011-09-18 19:04
    I guess I didn't ask this question correctly. I underrstand where to find the default values. What I need to know is what the numbers mean? I measured the distance between the wheels on my S2 and it is 143mm between the centerline of the tire on each wheel. I kept one wheel stationary and ran the other wheel to draw a circle and it draws a circle which is 455mm in diameter. If I assume that the value of approx 900 is in UNITS then 455 makes sense but why would the circle be in units and the distance between the wheel be in MM?

    any input would be appreciated.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-18 19:29
    As I stated before, this information is explained under set_wheel-calibration. Reviewing here:
    Full_circle is the number of encoder pulses required to turn one full revolution in place.
    Wheel_space is proportional to the spacing between the wheels and is approximately equal to that distance measured in millimeters.

    The default values are what get used if no alternative values have been stored in EEPROM.

    Here's a thread that sheds more light on the effect of small corrections to the default values:

    -Phil
  • 172heavy172heavy Posts: 55
    edited 2011-09-18 20:16
    As I stated before, this information is explained under set_wheel-calibration. Reviewing here:
    Full_circle is the number of encoder pulses required to turn one full revolution in place.
    Wheel_space is proportional to the spacing between the wheels and is approximately equal to that distance measured in millimeters.

    The default values are what get used if no alternative values have been stored in EEPROM.

    Here's a thread that sheds more light on the effect of small corrections to the default values:

    -Phil

    I appreciate the info, this is what I found when I looked at the documentation section of the object.

    PUB set_wheel_calibration(circle, space)

    Set calibration values to method's arguments, if they're reasonable.
    DOES NOT SAVE IN EEPROM.

    Example: s2.set_wheel_calibration(960, 160) 'Set Full_circle to 960 and
    'Wheel_space to 160.


    I will look at the link you provided, again thank you very much!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-18 20:34
    127heavy wrote:
    I appreciate the info, this is what I found when I looked at the documentation section of the object.

    PUB set_wheel_calibration(circle, space)

    Set calibration values to method's arguments, if they're reasonable.
    DOES NOT SAVE IN EEPROM.

    Example: s2.set_wheel_calibration(960, 160) 'Set Full_circle to 960 and
    'Wheel_space to 160.

    This is the full text of that method, including the part you left out, which does explain those parameters:
    PUB set_wheel_calibration(circle, space)
    
      {{ Set the wheel calibration values to method's arguments, if they're reasonable.
         IT DOES NOT SAVE THEM IN EEPROM.
      ''
      ''     [color=red][b]`circle: The number of encoder pulses required to turn in place 360 degrees.[/b][/color]
      ''
      ''     [color=red][b]`space: The spacing between the wheels. (Units are approximately 1mm.)[/b][/color]
      ''
      '' `Example: s2.set_wheel_calibration(960, 160)
      ''
      ''     Set `Full_circle to 960 and `Wheel_space to 160.
      }}
      
      Full_circle := circle
      Wheel_space := space
      _compute_calibration
      return get_wheel_calibration
    

    -Phil
  • 172heavy172heavy Posts: 55
    edited 2011-09-18 21:38
    09-18-11 10-14-06 PM.jpg
    09-18-11 10-14-06 PM.jpg
    This is the full text of that method, including the part you left out, which does explain those parameters:
    PUB set_wheel_calibration(circle, space)
    
      {{ Set the wheel calibration values to method's arguments, if they're reasonable.
         IT DOES NOT SAVE THEM IN EEPROM.
      ''
      ''     [color=red][b]`circle: The number of encoder pulses required to turn in place 360 degrees.[/b][/color]
      ''
      ''     [color=red][b]`space: The spacing between the wheels. (Units are approximately 1mm.)[/b][/color]
      ''
      '' `Example: s2.set_wheel_calibration(960, 160)
      ''
      ''     Set `Full_circle to 960 and `Wheel_space to 160.
      }}
      
      Full_circle := circle
      Wheel_space := space
      _compute_calibration
      return get_wheel_calibration
    

    -Phil

    You know, I don't think I like your tone, I didn't LEAVE anything, out I copied and pasted the code exactly as is in the version of the object that I downloaded. I was being sincere when I thanked you for providing this info because it is not in the version that I have. I would post a screen shot or email it to you in it's entirety but you would probably just accuse me of deleting it.

    You know what I don't understand about this forum is that Parallax has positioned itself as a product that encourages learning and teaching. Yet on the forums if you ask a basic question some people act like we are wasting their time. I guess to some people the forum is a good spot to let everyone know how smart they are.........

    Don't automatically assume that becasue someone asks a question that you happen to know the answer to that we are being lazy, I searched the forums and had already found the link that you provided but without the additional info it didn't make much sense.

    Josh s2.spins2.spin
    717 x 525 - 120K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-18 22:03
    Josh,

    Oh Smile! Sorry, man: I didn't mean to be snide or needlessly impatient. I really did think that you had left out those lines, since they're in the officially-released version (version Q) of the S2 object that's included in the software install. (Click the Help button in the GUI and "S2 Spin Object Documentation" to see the object formatted in HTML.) So now I'm wondering: from where did you access your copy (version P) that, as you correctly note, omits that information? If it's buried in the install package somewhere, we probably need to make some adjustments.

    (BTW, you probably shouldn't post your phone number in a public forum, as it could easily become subject to abuse by miscreants.)

    Thanks,
    -Phil
  • 172heavy172heavy Posts: 55
    edited 2011-09-19 06:19
    Phil,

    I downloaded the software from the Parallax website--not the OBEX--. I downloaded the archive from the following link. http://www.parallax.com/Portals/0/Downloads/docs/prod/robo/scribbler2/S2GUISource.zip.

    I checked it before sending this link and under the revision history it is listed as P. If I appeared to be snide or needlessly inpatient then I apologize, given the apparent miscommunication I was a little frustrated and couldn't figure our what I was missing, so I decided to make an attempt to better articulate my question.

    On a lighter note, the reason I am asking about the calibration is this I wrote a little program that takes input from a user that creates a pattern to cope pipe or tubing. It is working pretty well, but the accuracy needs to be a little better. Basically the programs takes the Header Diameter, the Branch Diameter and the Intersection Angle and calculates the 16 ordinate lines reqired to plot the pattern.

    I posted a demo below.

    Thanks for the help.

    Josh

    http://www.youtube.com/watch?v=kowxOKv1-to
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-19 11:04
    Josh,

    That's got to be one of the more interesting -- even esoteric -- apps I've seen for the S2! I'm not sure I understand entirely what it's supposed to do, so please continue to post as you progress.

    BTW, the zip file you posted a link to doesn't contain any Spin objects -- just Perl code. Can you check again, please, to see where that version "P" came from?

    Thanks,
    -Phil
  • 172heavy172heavy Posts: 55
    edited 2011-09-19 12:22
    Phil,

    Thank you for the compliment. If you go to the web page below and click on the "default program" link that is where you will find the archive with the old version. sorry about the mix up.

    http://www.parallax.com/go/S2

    As far as what the program is designed to do, it is drawing a pattern which will be cut out and wrapped around a piece of pipe for the purposes of coping. In order to weld two pieces of pipe--or tubing--together you have to cope it, so that you get a uniform gap all the way around the pipe.


    There are plenty of programs available to print these patterns however most welders do not have printers etc on their trucks in the field. Also any pattern that requires a piece of paper over 11x17 requires a plotter. The idea here is that a welder or fitter could take a piece of cardboard or poster board or whatever plug in the OD,ID and Intersection angle and let the s2-rip then cut it out. I chose the S2 platform because of the open source, this will probably have to be converted to a stronger platform. with less wiggle etc.

    The S2 is an awesome little product. To be honest I have been trying to figure out a way to do this for a few months I never thought about a robot actually drawing the pattern, and when I watched the scribble your name with the S2 video the light went off! --thanks Jessica!

    I will be sure to post another video and more details after I get it dialed in.

    Thanks again for the help.

    Josh
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-19 12:45
    Ah, so: the default program. There's not much I can to about that now, unfortunately, since that's the software that's already been pre-loaded into the S2. Maybe I can convince the person responsible for the default program to use version "Q" in the next build, so everything's on the same page. IIRC, there was a deadline for the default program that preceded that for the GUI, so I had to provide one that wasn't quite GUI- and documentation-ready. The only difference may be in the comments, though, and not the code itself.

    Now I understand what the "coping" program is for. That's got to be the first -- probably only -- "industrial" application of the S2! Neat idea!

    -Phil
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-09-19 13:09
    Josh,
    What a clever, "out of the box thinking" use for the S2.

    Phil, I was wondering when you two were'discussing' the "P" and "Q" versions. I had printed off some S2 spin code lately and I remember seeing "P" but not "Q". I'll need to go back and see where I got that and see if I can find the "Q" code. I have a feeling I have P's and Q's scattered all over several PC's......I really shouldn't be allowed to play with source code!!
  • 172heavy172heavy Posts: 55
    edited 2011-09-19 13:10
    No you can actually still download it from the web. If you right click the link you can download the zip file. I downloaded the sw and looked at it while I was in africa a few weeks back. That is when I wrote the code, when the S2 arrived I just loaded it on the prop and started testing.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-19 13:38
    If you install the S2 GUI, the "Q" version is what gets copied to the Editor subdirectory of the main program directory (where S2.exe is located). Also, in the Help/english subdirectory, there's a file called S2_doc.html, which is the autodoc'd version of S2.spin that can be opened in your web browser.

    -Phil
  • 172heavy172heavy Posts: 55
    edited 2011-09-20 16:12
    Since this thread is related to the S2 object, and not this project specifically, I am going to start a new thread once I get a little further on the development.

    It looks like I will need to tighten up a few areas on the S2 to get the accuracy where I want it. It is pretty darn good out of the box. The S2 object is great as well.

    I will probably lean toward creating a new S2 type robot with an aluminum chassis and a little more solid mounting for the pen and wheels.

    Thanks for all of the help!
Sign In or Register to comment.