Shop OBEX P1 Docs P2 Docs Learn Events
Erco's Oval Office Challenge — Parallax Forums

Erco's Oval Office Challenge

ercoerco Posts: 20,256
edited 2012-05-20 08:37 in Robotics
Based on a pseudo-challenge from John Board at http://forums.parallax.com/showthread.php?138125-Erco-s-Figure-Eight-Challenge&p=1093798&viewfull=1#post1093798 , here's my first pass at getting a Scribbler to to do an ellipse/oval. Best I can do at 4 am before vacation. I'll do better later. Can YOU do better? I'm calling out every roboticist here! My code posted after the video.

Here's my code for your consideration. It won't work in a stock Scribbler. This one is modified, different gearmotors wired to run in reverse. But you can see my thinking, or lack thereof. It runs the right outside wheel at max constant velocity while the left inner wheel ramps down and up twice. I think a BoeBot would do better on this course. Too bad I mounted a flamethrower on mine and gave it to Ken... :)
' {$STAMP BS2}
' {$PBASIC 2.5}
'scribbler IR oval
'modified scrib, REVERSE lower gearmotors
PAUSE 1000

PULSOUT 12,1000: PULSOUT 13,1000        'both motors full forward initially

main:
FOR B2=1 TO 2                                        ' 2 loops

FOR W0=1240 TO 1900                            'ramp left motor down
PULSOUT 13,W0
NEXT
FOR W0=1900 TO 1240                            'ramp left motor up
PULSOUT 13,W0
NEXT
NEXT                                                       'loop back
PULSOUT 12,2000:PULSOUT 13,2000        'stop all
END
«1

Comments

  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-27 06:46
    Cool, I will give this a try over the weekend.
  • ercoerco Posts: 20,256
    edited 2012-04-27 09:18
    An S2 (with its encoders and PhiPi's fine S2 object) could fake an oval with several "arc to" commands, changing radius 4 times. Heck, ttailspin or the Gatorbots could knock that out in a minute or less.

    Who'll do it first?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-04-27 10:06
    I'm in the process of translating erco's BS2 code to Spin. I'll film (I mean SD card) my PropBOE running the code soon.
  • ercoerco Posts: 20,256
    edited 2012-04-27 11:17
    XLNT, the race is on! I guess we can all see where this is headed. OVAL FIGURE 8 around elongated dinner platters and gravy boats! :)
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-29 13:46
    My answer to the challenge.

    My code is not just for ellipses, it is a complete curve following system!
  • ercoerco Posts: 20,256
    edited 2012-04-29 14:09
    Finally a response with true "outside the box" thinking! Genious, I say! Now throw a half twist in your cardboard loop to create "Martin's Moebius Challenge"!
  • ercoerco Posts: 20,256
    edited 2012-04-29 19:19
    Duane Degn wrote: »
    I'm in the process of translating erco's BS2 code to Spin. I'll film (I mean SD card) my PropBOE running the code soon.

    Whatcha got, Duane-san? And everyone else? I leave for vacation Tuesday morning and I wanna see some oval office activity before I go! :)
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-04-29 19:42
    erco wrote: »
    Whatcha got, Duane-san? And everyone else? I leave for vacation Tuesday morning and I wanna see some oval office activity before I go! :)

    Give me a couple of seconds to come up with some good excuses. . . I've been learning DipTrace?. . Yeah kind of lame.

    Well it turns out this isn't as simple as I had thought. You can't just alternate the speed of one wheel while keeping the other one going at a constant rate without getting the timing down.

    I've altered my PropBOE-Bot code to use the rudder channel and three position switch channel to modify three different parameters of the PropBOE-Bot. The first parameter is the fastest speed the left wheel can travel. The second parameter is the slowest speed the left wheel can travel and the final parameter is the speed used by the right wheel.

    I haven't tried this program yet. Hey, I can pretend it will work as long as I haven't tested it?!?

    I've been surprised by my testing so far at how limited the range of pulse lengths there is that will effect the speed of these servos. I'm pretty sure a pulse length of 1600 is already at top speed. I'm still not sure what the top speed is (hence the adjustable parameters).

    Okay, okay, stop poking. I'll get off my. . . chair and try the program.

    Back in a few to report.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-29 19:53
    Erco, I'm glad you like my solution. I think a moebius challenge will require zero g to allow the half turn. Either that or sticky wheels.

    Duane, I decided that speed control was too hard and decided constraining the path of the robot is easier. Something to think about.
  • ercoerco Posts: 20,256
    edited 2012-04-29 19:56
    @Duane: That Scribbler BS2 program took me all of 2 minutes at 4 am and wasn't bad for a first pass. Surely your vaunted Prop-BoE will practically code itself with minimal fussification! Just tell it what you want it to do. Ask nicely. Say please. After all, the fate of the world depends on it! Martin and I have done our part!
  • ercoerco Posts: 20,256
    edited 2012-04-29 20:00
    Martin_H wrote: »
    Erco, I'm glad you like my solution. I think a moebius challenge will require zero g to allow the half turn. Either that or stickg wheels.

    Based on Gordon's smart alec reply to my Magician chassis video (circle=half a figure 8), I just need to get it to flip over at the right time to do the other half of the figure 8.

    Yeah, I'm serious. After vacation. Fairly Moebius-y, eh? Remind me, I will do it after vaca.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-04-29 20:39
    erco wrote: »
    @Duane: That Scribbler BS2 program took me all of 2 minutes at 4 am and wasn't bad for a first pass. Surely your vaunted Prop-BoE will practically code itself with minimal fussification! Just tell it what you want it to do. Ask nicely. Say please. After all, the fate of the world depends on it! Martin and I have done our part!

    I asked it nicely, and you wouldn't believe its language! Now I know why thy had to bleep out so many of of R2-D2's words; little robots curse like sailors.

    The program didn't work correctly. It did what I told it to do and not what I wanted it to do.

    I hope the world will hang in there long enough for me to debug it (the code, not the world).
  • Roger LeeRoger Lee Posts: 339
    edited 2012-04-29 22:00


    Erco, That took care of my weekend. Thanks for the fun. enjoyed every minute of it.
  • ercoerco Posts: 20,256
    edited 2012-04-29 22:20
    Our new champion and hero! Great job Roger Lee, your bot is magnificent in its accuracy and repeatability! We would love to hear more about your robot & method. Propeller? Encoders? Steering method? What other wonders can it achieve? I hope you don't scare other people out of trying the challenge with your excellent 4-lap achievement. :)
  • Roger LeeRoger Lee Posts: 339
    edited 2012-04-29 22:39
    Erco, you hit the nail on the head. One lap took a few minutes, 2 about an hour. I wanted more. Haha
    I'll pass on my time line for four laps. I really did get a little bit of other stuff done this weekend.


    It is propeller powered, no encoders. I believe you call it differential steering(?).
    There are three IR sensors on board, unused in this program.
    Well, they do change the indicator LEDs from green to red but have no impact on the drive motors.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-30 06:00
    Roger, great performance for an open loop system!

    Anyone else up for the challenge?
  • ercoerco Posts: 20,256
    edited 2012-04-30 06:36
    Duane Degn wrote: »

    I've altered my PropBOE-Bot code to use the rudder channel and three position switch channel to modify three different parameters of the PropBOE-bot.

    I don't get the rudder channel on my tv. Am I missing out? :)
  • ercoerco Posts: 20,256
    edited 2012-04-30 09:21
    Roger Lee wrote: »
    Well, they do change the indicator LEDs from green to red but have no impact on the drive motors.

    @Roger: Are you using motors & a controller, or CR servos?
  • TtailspinTtailspin Posts: 1,326
    edited 2012-04-30 10:05
    Wedding.jpg

    gonna have to wait bro, i got front row seats... cant miss this one.
    1024 x 1153 - 105K
  • ercoerco Posts: 20,256
    edited 2012-04-30 10:07
    You best man or getting hitched, Tommy???!!! Congrats either way!

    But at least you can dance in an oval while we wait...
  • Roger LeeRoger Lee Posts: 339
    edited 2012-04-30 13:23
    My custom bot is using 30:1 gear motors and a L293DNE H-bridge for the driver.

    motor operating range 4.5 - 12 VDC. I get about 9 with fresh cells installed.

    The original intent for this machine was (and still is ) wall following, maze solving. Some day, some day.
  • ercoerco Posts: 20,256
    edited 2012-04-30 13:51
    I think you can go head to head with Martin_H for oval wall following right now!
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-30 14:02
    Roger, I've been meaning to try line maze solving for a while now and haven't gotten around to it. So I know what you mean.

    But wall following should be a piece of cake for you if you can do the ellipse. Here are two wall following samples I did over two evenings.

    http://forums.parallax.com/showthread.php?139096-Wall-Following-Examples-(video-and-code)

    The first style of wall following only requires bumpers or a single Ping))). The second can be done using a Ping))) on a turret or a Ping))) and a bumper. They're in PBasic, not Spin.
  • ercoerco Posts: 20,256
    edited 2012-04-30 15:34
    Wall maze or tape (line following) maze?
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-30 16:16
    Erco, I'm not sure who you directed the question to, but I was thinking line following mazes as they are less trouble to build.

    In any event, have a good vacation and time off with your family.
  • ercoerco Posts: 20,256
    edited 2012-04-30 23:31
    Thanks Bro! We're outta here in the AM, but I'll check in occasionally to see how Duane and everyone is getting their oval on!
  • TtailspinTtailspin Posts: 1,326
    edited 2012-05-01 13:39
    I am the father of the Groom. and we danced and celebrated until sunrise, It was great meeting all the new in-laws..
    But, I'm pretty sure someone put something in one of my drinks, things got pretty fuzzy after 4:AM...:smile:

    Anyways, Here is a Scribbler2 in action around the Oval, or Soft Arch as it's called in my trade...
    Not the fastest or the coolest lap around the plates, but what can I say? I am still a bit fuzzy...:confused:

    Have fun on your vacation erco, and try not to go into BS2 withdrawals while you are Away From Keyboard...:thumb:


    -Tommy
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-01 13:52
    erco wrote: »
    I'll check in occasionally to see how Duane and everyone is getting their oval on!

    Have a good vacation. If you up near Idaho let me know, I'd be happy to take you and yours out to the nicest restaurant in town (either "Tasty Treat" or "Mc Donald's").

    I've almost ready to send a PCB order in. Once the order is in, I'll have a bit more time to get "an oval to it" (as apposed to "a round to it"). Oh, I crack myself up sometimes (but, rarely others).
  • Roger LeeRoger Lee Posts: 339
    edited 2012-05-01 15:34
    Well done Ttailspin, Isn't everything fuzzy around 4:00 am.

    I was thinking a day ago about adding one more requirement to the "rules".

    "All video of the robot must show your kitchen floor".

    I could be wrong, but from what I can see this would not have changed anything.



  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-01 16:02
    Nicely done Tommy.
Sign In or Register to comment.