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.)
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.
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.
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.
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.
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.
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.
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 havent achieved yet to give the radius as an input (That exactly Im trying now).
Martin, has done an excellent asymmetric figure 8 (post#276) but I didnt 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, in order to achieve the figure 8 with the Activity bot. So I suspect that he hasnt also the radius as an input.
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)
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.
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.
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
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, 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.
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.)
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.
Comments
(I just made that up, you can use that if you want to.)
-Tommy
Has Parallax ever called it Scribbler 2 or 3 ?
It is listed as "Scribbler 2(S2)" http://www.parallax.com/catalog/robotics/complete-robots it's a free for all now.
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:
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.
-Tommy
Who else will answer the call?
Anyway, my first shot start at a figure 8. Needs work.
erco said
Here's another video:
[video=youtube_share;iyDPer_6UaE]
My ActivityBot DC needs a little more work.
John
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!
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 havent achieved yet to give the radius as an input (That exactly Im trying now).
Martin, has done an excellent asymmetric figure 8 (post#276) but I didnt 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, in order to achieve the figure 8 with the Activity bot. So I suspect that he hasnt also the radius as an input.
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)
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.
http://www.nwupgradesplus.com/Downlo...Test_Run_1.avi
Thanks, but it is actually 3 wheel drive. One side is stationary while the other side moves.
I also posted the (extremely crude, ugly and primitive) code.
Massimo
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.
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.)
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).
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.