Erco's Figure Eight Challenge

17810121323

Comments

  • TtailspinTtailspin Posts: 1,326
    edited 2014-09-01 - 14:25:51
    When you want it done RIGHT, and you want it done NOW!.. Just call on the S2 to gett'er done, RIGHT NOW!
    (I just made that up, you can use that if you want to.) :)


    -Tommy
  • ercoerco Posts: 19,738
    edited 2014-09-01 - 17:35:33
    I'm not sure if Scribbler2 is correct in robotic parlance. It's S2 officially, ya know.

    Has Parallax ever called it Scribbler 2 or 3 ?
  • TtailspinTtailspin Posts: 1,326
    edited 2014-09-01 - 18:14:34
    Kinda makes you want to be more careful about who you compare GENIUS with...:smile:


    It is listed as "Scribbler 2(S2)" http://www.parallax.com/catalog/robotics/complete-robots it's a free for all now.
  • ercoerco Posts: 19,738
    edited 2014-09-01 - 19:55:50
    I sit corrected! Thanks for the schooling, TT. :)
  • Martin_HMartin_H Posts: 4,050
    edited 2014-09-01 - 20:03:53
    You asked for an asymmetric figure eight, you got it:

    I'm using an aRobot I picked up on eBay for about half its new price. The trike steering is a natural for this sort of challenge, and its encoder allows for fairly precise odometry as long as you are traveling in arcs. Here's the code:
    ' ==================================================  ============================
    '
    '   File...... AdvancedWallFollow.BSE
    '   Purpose... The robot performs an asymetric figure eight while playing a tune.
    '   Author.... Martin Heermance
    '   E-mail.... mheermance@gmail.com
    '   Started... 2014 September 1st
    '   Updated... 2014 September 1st
    '
    '   {$STAMP BS2}
    '   {$PBASIC 2.5}
    ' ==================================================  ============================
    
    ' ------------------------------------------------------------------------------
    ' Program Description
    ' ------------------------------------------------------------------------------
    ' This program can be used with a robot to move in a figure eight while playing
    ' a tune.
    
    ' ------------------------------------------------------------------------------
    ' Revision History
    ' ------------------------------------------------------------------------------
    
    ' Pin allocations.
    whisker1        PIN   0  ' Whisker Left.
    whisker2        PIN   1  ' Whisker Right.
    netpin          PIN   8  ' Coprocessor network pin.
    speaker         PIN   9  ' Speaker.
    redled          PIN  10  ' Red led.
    grnled          PIN  11  ' Green led.
    jumper1         PIN  12  ' Jumper 1.
    jumper2         PIN  13  ' Jumper 2.
    button1         PIN  14  ' Button 1.
    button2         PIN  15  ' Button 2.
    
    ' These values need tweaking for each BS2 variant.
    netbaud         CON 396  ' Coprocessor network baud. 2400
    
    notes DATA Word 2637, Word 2489, Word 2349, Word 2217, Word 2349, Word 2217,
               Word 2093, Word 1975, Word 2637, Word 2489, Word 2349, Word 2217,
               Word 2093, Word 2793, Word 2637, Word 2489, Word 2637, Word 2489,
               Word 2349, Word 2217, Word 2039, Word 2217, Word 2349, Word 2489,
               Word 2637, Word 2489, Word 2349, Word 2217, Word 2093, Word 2793,
               Word 2637, Word 2489, Word 2637, Word 2489, Word 2349, Word 2217,
               Word 2093, Word 2217, Word 2349, Word 2489, Word 2637, Word 2489,
               Word 2349, Word 2217, Word 2349, Word 2217, Word 2093, Word 1975,
               Word 2093, Word 2217, Word 2349, Word 2489, Word 2637, Word 2793,
               Word 2637, Word 2489, Word 2637, Word 2489, Word 2349, Word 2217,
               Word 2349, Word 2217, Word 2093, Word 1975, Word 2093, Word 2217,
               Word 2349, Word 2489, Word 2637, Word 2960, Word 3136, Word 3322,
               Word 3520, Word 3322, Word 3160, Word 2960, Word 2793, Word 3729,
               Word 3520, Word 3322, Word 3520, Word 3322, Word 3160, Word 2960,
               Word 2793, Word 2960, Word 3136, Word 3322, Word 3520, Word 3322,
               Word 3160, Word 2960, Word 2793, Word 3729, Word 3520, Word 3322,
               Word 3520, Word 3322, Word 3136, Word 2960, Word 2793, Word 2960,
               Word 3136, Word 3322, Word 3520, Word 3322, Word 3160, Word 2960,
               Word 3136, Word 2960, Word 3136, Word 2793, Word 2637, Word 2793,
               Word 2960, Word 3136, Word 3322, Word 3520, Word 3729, Word 3520,
               Word 3322, Word 3520, Word 3322, Word 3136, Word 2960, Word 3136,
               Word 2960, Word 2793, Word 2637, Word 2793, Word 2960, Word 3136,
               Word 3322, Word 3520, Word 3729, Word 3520, Word 3322, Word 3520,
               Word 1760, Word 1661, Word 1760, Word 1661, Word 1760, Word 1661,
               Word 1760, Word 3729, Word 1760, Word 3720, Word 1760, Word 3720,
               Word 1760, Word 3720, Word 1760, Word 3720, Word 1760, Word 1661,
               Word 1760, Word 1661, Word 1760, Word 1661, Word 1760, Word 1661,
               Word 3729, Word 1760, Word 3720, Word 1760, Word 3720, Word 1760,
               Word 3720, Word 1760, Word 3720, Word 1760, Word 0
    
    index           VAR Word
    duration        VAR Word
    encCount        VAR Word
    note            VAR Word
    position        VAR Byte
    ack             VAR Byte
    
    main:
      DO UNTIL button1 = 0
      LOOP
    
      position = 60
      GOSUB Steer
      encCount = 295
      GOSUB Move
      GOSUB PlayBumble
    
      position = 255
      GOSUB Steer
      encCount = 180
      GOSUB Move
      GOSUB PlayBumble
    
      position = 128
      GOSUB Steer
      END
    
    '------------------------------------------------------------------
    '
    Move:
      SEROUT netpin, netbaud, ["!1M115", HEX4 encCount] ' set steering servo position
      SERIN  netpin, netbaud, [ack]       ' Get response from coprocessor
      RETURN
    
    Steer:
      SEROUT netpin, netbaud, ["!1R1", HEX2 position]  ' set steering servo position
      SERIN  netpin, netbaud, [ack]       ' Get response from coprocessor
      PAUSE 500
      SEROUT netpin, netbaud, ["!1R100"]  ' turn servo off
      SERIN  netpin, netbaud, [ack]       ' Get response from coprocessor
      RETURN
    
    PlayBumble:
      duration = 100
      note = 1
      index = 0
    
      DO UNTIL note = 0
        READ notes + index, Word note
    
        index = index + 2
        FREQOUT speaker, duration, note
      LOOP
      RETURN
    

    The coprocessor make for short work of it since there's no tending servos, motors, or the encoder. The BS2 just kicks back and plays a tune.
  • TtailspinTtailspin Posts: 1,326
    edited 2014-09-01 - 20:36:37
    That is what a Caster free world should look like. :thumb::thumb: I like it.



    -Tommy
  • ercoerco Posts: 19,738
    edited 2014-09-01 - 21:34:04
    Sweetness, M_H! I have an Arobot sitting in my closet, a local Craigslist transaction. Never fired it up, but now maybe I will. I wasn't impressed with the slop in the steering linkage, but it doesn't look like it held you back! Nicely done. Good to see some new activity here.

    Who else will answer the call?
  • ercoerco Posts: 19,738
    edited 2014-09-02 - 00:02:25
    New bot, my first Robo-tank. I modified the Tamiya treaded vehicle kit & dual gearbox kits. Treads look cool, but are not the best chassis for dead reckoning by timed maneuvers, even on a smooth floor. Wheels (and casters, Tommy!) are superior.

    Anyway, my first shot start at a figure 8. Needs work.
  • Martin_HMartin_H Posts: 4,050
    edited 2014-09-02 - 06:48:31
    Cool beans Erco. I just scanned all the posts and that's only the third threaded bot to take the challenge. We've had two trike steering (your first bot, and my most recent), three omni wheeled, and Tommy's unconventional drive bot. All the rest have been differential steering.
  • John A. WilliamsJohn A. Williams Posts: 8
    edited 2014-09-02 - 09:27:08
    Hi erco,

    erco said
    I have a silly idea to temporarily add two servos to one of my prized 1966 Remco Lost in Space toy robots to make it do a figure 8. One moves the on/off switch and the other changes the steering from left to right circle. Pointless, and I'm not sure when I'll get to it, but the thought of making things "do the eight" that otherwise shouldn't is kind of fun.

    I blame Ttailspin. A while back, he shared a video of his robot riding on top of an S2 which did a figure 8. That's not cheating, that's GENIUS.

    Here's another video:

    [video=youtube_share;iyDPer_6UaE]

    My ActivityBot DC needs a little more work.

    John
  • ercoerco Posts: 19,738
    edited 2014-09-02 - 10:48:11
    A three-fer? That's unprecedented, John! Well done and bravo. I almost expected your piano was going to do an 8 next.

    The "stack attack" was cool, Stingray carrying S2. Would love to see a 2-stage, where the S2 auto-detaches from Stingray (rolls down a ramp?) And commences its 8.

    Excellent work, Sir Williams!
  • WhitWhit Posts: 4,131
    edited 2014-09-02 - 12:25:05
    Great job John! Love the piggy-back run.
  • NikosGNikosG Posts: 702
    edited 2014-09-03 - 10:16:02
    Has anyone achieved the figure 8 challenge giving the radius of the circle as an input?

    My suggestion for the asymmetric figure 8,(post#263) has exactly that purpose. We know only the distances X and Y from the two points A and B and we give them as input in our code. Personally although I can do a perfect figure 8 with the Artist, I haven’t achieved yet to give the radius as an input (That exactly I’m trying now).

    Martin, has done an excellent asymmetric figure 8 (post#276) but I didn’t see the radius as an input on his code.

    Williams also on his video (post#281), on 1:57 changes the distance between the two plates (distance A, B) in order to achieve the figure 8 with the Activity bot. So I suspect that he hasn’t also the radius as an input.
  • Martin_HMartin_H Posts: 4,050
    edited 2014-09-03 - 11:12:55
    NikosG wrote: »
    Martin, has done an excellent asymmetric figure 8 (post#276) but I didn’t see the radius as an input on his code.

    Thanks. With tricycle drive the radius of curvature is specified indirectly via the angle you turn the wheels. So on the first loop I set the wheels to a shallow angle, while in the second I set it to a tight angle. I could probably work out a scaling factor between wheel angle and radius of curvature.

    Update: It turns out the math has already been worked out on this one. A tricycle drive has two radii of curvature. The one for the front wheel, and the one for the back wheels. The formula for the respective radii is:

    front wheel radius of curvature = Wheel base / sin (front wheel angle)

    rear wheels radius of curvature = Wheel base / tan (front wheel angle)

    So arcsin and arctan can be used to compute the wheel angle from a desired radius. So if we're measuring the front wheel we would use:

    front wheel angle = arcsin (wheel base / desired radius of curvature)
  • ercoerco Posts: 19,738
    edited 2014-09-03 - 17:28:14
    Martin_H wrote: »
    Cool beans Erco. I just scanned all the posts and that's only the third threaded bot to take the challenge. We've had two trike steering (your first bot, and my most recent), three omni wheeled, and Tommy's unconventional drive bot. All the rest have been differential steering.

    Great idea to keep count, maybe even regularly edit your original post to include that info up front on a big toteboard. :)

    BTW, I've had two differential bots do the figure 8, my first BS1 bot with encoder in post #13 and the can-blasting Terminator in post #244 .

    And I have two walking bots, Spiderbot in post #248 and Penguin in post #255 . Reminds me that I haven't had Theobot do the 8 yet. Top of my to-do list!

    Duane has at least one walker, too. Have to go back & count 'em all sometime.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-09-05 - 19:00:40
  • ercoerco Posts: 19,738
    edited 2014-09-05 - 19:05:14
    Format not supported on my phone! I'm traveling sans computer so I can't see it for a while. You don't trust Youtube, huh?
  • WhitWhit Posts: 4,131
    edited 2014-09-05 - 19:18:50
    Nice pair of opposing 6 wheel drive donuts Andy!
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-09-05 - 19:42:31
    You don't trust Youtube, huh
    Not really. Too much hacking going on these days. File was too large for Parallax to let me upload so I put it on my own website. Really nice of Apple to come out and say they will now let people know when they are being hacked. Their most recent hacking is why I am TOTALLY against Cloud storage.
    Nice pair of opposing 6 wheel drive donuts Andy!
    Thanks, but it is actually 3 wheel drive. One side is stationary while the other side moves.
  • TtailspinTtailspin Posts: 1,326
    edited 2014-09-05 - 21:01:18
    Just add some Dinner Plates, and your good to go. :)
  • max72max72 Posts: 1,150
    edited 2014-09-08 - 12:44:46
    NikosG wrote: »
    Has anyone achieved the figure 8 challenge giving the radius of the circle as an input?
    I did one (asymmetric too) with cheap steppers and Tachyon somewhere back in the thread.
    I also posted the (extremely crude, ugly and primitive) code.
    Massimo
  • photomankcphotomankc Posts: 929
    edited 2014-09-08 - 13:01:55
    NikosG wrote: »
    Has anyone achieved the figure 8 challenge giving the radius of the circle as an input?

    My suggestion for the asymmetric figure 8,(post#263) has exactly that purpose. We know only the distances X and Y from the two points A and B and we give them as input in our code. Personally although I can do a perfect figure 8 with the Artist, I haven’t achieved yet to give the radius as an input (That exactly I’m trying now).

    Martin, has done an excellent asymmetric figure 8 (post#276) but I didn’t see the radius as an input on his code.

    Williams also on his video (post#281), on 1:57 changes the distance between the two plates (distance A, B) in order to achieve the figure 8 with the Activity bot. So I suspect that he hasn’t also the radius as an input.


    My old entry was based on that exactly. It did arcing turns by supplying the radius of the circle, then the distance the outside wheel would travel around that circle was calculated and the inside wheel calculated for (radius) - (wheelbase) at the correctly reduced steps/sec. Because of step frequency resolution issues some values worked better than others. My new bot has all the CPU in the world to figure arcs out but the dang L6470 chips for the motors only adjust speed in 15.25 step/sec increments so for any given outside wheel speed there are only a few possible arcs that can be correctly traced. Still trying to figure out how to work the math on that.
  • Duane DegnDuane Degn Posts: 10,156
    edited 2020-03-05 - 21:10:07
    NikosG wrote: »
    Has anyone achieved the figure 8 challenge giving the radius of the circle as an input?

    I think the new "ARC" command I added to the Eddie code does this pretty well (though not as well as your code does it). (Jump to 1:24 to see the figure 8.)



    Since the speed parameter of the ARC command is applied to the center of the robot, it doesn't work with a radius set to zero. If the radius is set to less than the radius of the robot, then one wheel will move backward.

    The spins at the end of the video used the "TURN" command.

    (It sure is nice to have the forums up and running again.)
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-11-22 - 11:40:20
    I do not think I have seen anyone use a Toddler for this challenge. Question: Can we use black tape to "cheat" so a Toddler could follow?
  • Duane DegnDuane Degn Posts: 10,156
    edited 2014-11-22 - 11:55:46
    NWCCTV wrote: »
    Question: Can we use black tape to "cheat" so a Toddler could follow?

    I think the general consensus is you're welcome to cheat anyway you want as long as you let us know how you're cheating.

    My PropBOE-Bot figure 8 was under remote control (at least the first one was).
  • PublisonPublison Posts: 11,514
    edited 2014-11-22 - 12:27:51
    NWCCTV wrote: »
    I do not think I have seen anyone use a Toddler for this challenge. Question: Can we use black tape to "cheat" so a Toddler could follow?

    Andy,

    Are you going to mount some IR detectors on the feet? How would that work?

    I think the toddler challenge would just be brute force PULSOUT., and outputs adjusted to achieve the correct turns and time.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-11-22 - 15:02:04
    Publison wrote: »
    Andy,

    Are you going to mount some IR detectors on the feet? How would that work?

    QUOTE]
    No, I was thinking of modifying the edge finding program to follow black tape. If it can detect the edge of a table it should be able to "see" black tape.

    How the heck did you get the quote in a box????
  • PublisonPublison Posts: 11,514
    edited 2014-11-22 - 15:36:14
    So you were thinking of using the "Drop off Detector" ? May be a little too high to sense a strip on the table, but hey, give it a shot!
  • PublisonPublison Posts: 11,514
    edited 2014-11-22 - 15:40:24
    NWCCTV wrote: »
    Publison wrote: »
    How the heck did you get the quote in a box????


    Looks like the quote and other features got deleted during the ongoing upgrades.
  • ercoerco Posts: 19,738
    edited 2014-11-22 - 20:02:12
    Publison wrote: »
    NWCCTV wrote: »


    Looks like the quote and other features got deleted during the ongoing upgrades.

    Works for me. Sorta. Needs work.
Sign In or Register to comment.