Shop OBEX P1 Docs P2 Docs Learn Events
S2 Calibration? — Parallax Forums

S2 Calibration?

deanwesterburgdeanwesterburg Posts: 25
edited 2012-11-02 20:47 in Robotics
My S2 robot seems to track strait, however, when I use the Arc_to function or Drive the robot back and forth between 2 points, it's clear it is not making a 180 degree turn.

If I do the following, my endpoints are more than 1" apart and the lines are not parallel

my start point is 0,0

S2.begin_path ' Start the drawing
S2.move_to(0,800)
S2.move_to(0,0)
S2.move_to(0,800)
S2.move_to(0,0)

Is this expected and within tolerance? Is there a calibration program, or is the only way to resolve this to modify my S2 library to specifically match this robot?

Thanks!

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-11-02 19:55
    Dean,

    You need a call to end_path to complete your motion sequence.

    That notwithstanding, you may need to adjust the calibration for your particular S2. The two parameters of interest are the "full circle" and "wheel spacing" values, which are initialized from the factory as follows:
      DEFAULT_FULL_CIRCLE   = 955
      DEFAULT_WHEEL_SPACE   = 153
    

    By adjusting these two parameters in a call to set_wheel_calibration, you should be able to come closer to repeatability nirvana. Once you've established good values, send the same parameters to write_wheel_calibration to secure them in EEPROM as the defaults for your S2.

    Incidentally, accurate tracking requires running on a hard, smooth, level surface.

    -Phil
  • deanwesterburgdeanwesterburg Posts: 25
    edited 2012-11-02 20:47
    Thanks Phil! That's exactly what I needed! I'm surprised I couldn't find this on the forum. Maybe no one else is trying to use their S2 as a plotter!
Sign In or Register to comment.