Erco's Oval Office Challenge
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...
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
Comments
Who'll do it first?
My code is not just for ellipses, it is a complete curve following system!
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.
Duane, I decided that speed control was too hard and decided constraining the path of the robot is easier. Something to think about.
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.
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).
Erco, That took care of my weekend. Thanks for the fun. enjoyed every minute of it.
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.
Anyone else up for the challenge?
I don't get the rudder channel on my tv. Am I missing out?
@Roger: Are you using motors & a controller, or CR servos?
gonna have to wait bro, i got front row seats... cant miss this one.
But at least you can dance in an oval while we wait...
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.
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.
In any event, have a good vacation and time off with your family.
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...
Have fun on your vacation erco, and try not to go into BS2 withdrawals while you are Away From Keyboard...:thumb:
-Tommy
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).
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.