Shop OBEX P1 Docs P2 Docs Learn Events
The "Artist" robot - Page 5 — Parallax Forums

The "Artist" robot

1235

Comments

  • NikosGNikosG Posts: 705
    edited 2015-04-03 13:54
    Whit wrote: »
    Great stuff Nikos! Super photos and video!

    Thank you Whit !
    If you have time put a pen in your S2 upload the next spin code and see the result!
    The S2 will draw a Greek dancer dancing "The Evdokia's Zeibekiko" and simultaneously plays the song!

    The "Artist" performs the same activity more impresive due to the SD card and the vecho speaker, but the accuracy of the S2 is remarkable!
  • NikosGNikosG Posts: 705
    edited 2015-04-04 06:44
    Another video with "Artist", dancing and singing the "Evdokias Zeibekiko" (Rock edition), during the 3rd day of 5th digital student's festival in Patras-Greece 2015

    The drawing has some improvements: The figure "8" s are symetrical and smaller in order to fit the entire shape in the 2 X2,5m black moquette That I bought for this purpose....
  • ercoerco Posts: 20,244
    edited 2015-04-04 10:38
    Nicely done, and way to display the Parallax banner!
  • NikosGNikosG Posts: 705
    edited 2015-04-05 03:18
    erco wrote: »
    Nicely done, and way to display the Parallax banner!

    Thank you Erco!
    I displayed the Parallax banner and in a second event (the same day) :

    Saturday 5 April 2015, after the 5th student’s digital festival, another festival took place in Patras city.
    The “Annual student’s festival”, that is supported mostly from young with strong political interest and political parts against the European Union.
    One of my students (Tassos), a politically active student, asked me to present the “Artist” and the “Parallax S2 robot” in this festival.
    Although I totally disagree with politics, I accepted this challenge because I believe that robots must be beyond politics and they consist a great way for a better future for young people.
    It was a great opportunity to make a contact of that part of youth with robotics and Parallax.

    After the Show, “Artist” and S2 robot got the applauses from the audience, and I accepted a lot of questions about Parallax and robots in general. I realized that many graduated student’s had a totally ignorance about robotics because of their only interest in politics!
  • ercoerco Posts: 20,244
    edited 2015-04-05 03:57
    Bravo, you're quite the showman! Seems like there's a joke in there somewhere about "how many politicians does it take to program a robot...?"
  • NikosGNikosG Posts: 705
    edited 2015-04-14 15:11
    Drawings: The last part of the “Artist’s” project

    The last part of this project is the drawings. Except from the figure 8s and the “flowers”( post #106), the robot must be able to make and other shapes like triangles, rectangles, polygons, curves , straight lines and Letters!!!

    So it is very important to program it, in order to turning in place with accuracy.
    In order to test the robot’s behavior, I made a square ring divided in 36 sectors with degrees from 0 to 360. Each sector is equal to 10 degrees.
    I also added an “indicator” from cardboard on the front of the Artist in order to measure the turns.

    attachment.php?attachmentid=113889&d=1429049204


    I used the command drive speed (25, -25) and I found the certain amount of time that is needed for the various angles.
    This time is given by the formula: time=Round(angle*14,7778)

    attachment.php?attachmentid=113890&d=1429049257

    The use of the drive_speed command gave me a very good result and accuracy! I have to say that using the drive_goto command, I had some problems......
    819 x 776 - 223K
    705 x 688 - 211K
  • NikosGNikosG Posts: 705
    edited 2015-04-16 09:07
    Let’s take a closer look at the drive_speed(a,b) command.
    This command can make the robot to go at straight lines when (a=b), or make curves and circles when (a>b).

    The calculations for straight lines in curtains distances are very easy as the distances are proportional to the amount of time on the Pause () command.

    The question is how can we make certain circles (if we know the radius R of the circle) using the drive_speed (a,b) command? Can we have a formula to calculate the (a) and (b)?
    The answer is yes. The remarkable is although (a) and (b) represent ticks per second of left and right wheel, their quotient is independent from encoder’s ticks and it depends only from the distance (d) between the two wheels of the robot.
    So if we want for example to draw a circle with radius R=40cm with the “Artist” that has d=28,5cm (distance between the two wheels).

    We use the Drive_speed(a,b) and we choose for a= 25 (or any other integer).Then the b=a*(2*R-d)/(2*R+d)=25*(2*40-28,5)/(2*40+28,5)=12 . So the right command is : drive_speed(25,12)
    Let’s see why:

    attachment.php?attachmentid=113914&d=1429199916


    After some tests I verified in practice all the above formulas and I am convinced that we can draw everything using only the drive_speed command.


    The next step will be the creation of an ALPHABET for artist or ARLO robots in propeller C!
    863 x 740 - 181K
  • NikosGNikosG Posts: 705
    edited 2015-04-17 07:34
    The next question is how can we calculate the time for o full circle or the time for a disired arc (angle ω).

    The answer is in the next image:

    attachment.php?attachmentid=113923&d=1429280308

    if you use the above formula on your robot the only thing that maybe must change is the constant 59,94.

    That 59,94 is the time we put on Pause command after a drive_speed(25,25) in order to make the robot move straight for 1cm

    Tip: find the time in order to move the robot straight 1m=100cm and then divide with 100.

    You can trust all the above formulas as I have allready tested them.( I can explain if you have any question)

    I tried to draw the letters "A" and "B" using the above theory. The letter "B" had curves that were arcs with radius 5 and angle 180

    attachment.php?attachmentid=113924&d=1429280939

    Although I didn't use Pen Up and Pen Down commands I think the result is right.

    Any volunteer for the letter's design?
    976 x 753 - 186K
    871 x 720 - 260K
  • WhitWhit Posts: 4,191
    edited 2015-04-17 14:23
    This thread and the information contained here just keeps getting better and better Nikos - Thanks again for your great documentation and willingness to share!

    Ευχαριστώ!

    P.S. - Even though I knew this - It is still fascinating to me that "Thank you" in Greek is essentially the same word as Eucharist!
  • NikosGNikosG Posts: 705
    edited 2015-04-21 01:19
    Thank you Whit!
    I hope you'll find interest and the next example:

    Trying to verify the avove theory and formulas, I tried to draw 10 circles with gradually grow up the radius from 5 cm to 50 cm with step 5.

    I found the appropriate drive_speed(a,b) commands, (the first parameter was a=25 and I changed only the b).
    and I also found the time for the Pause command in order to complete every circle. And here it is:

    attachment.php?attachmentid=113956&d=1429604231

    The result was exactly as i expected !
    1017 x 1423 - 1M
  • WhitWhit Posts: 4,191
    edited 2015-04-21 05:02
    Wow! Very nice Nikos!
  • NWCCTVNWCCTV Posts: 3,629
    edited 2015-04-21 20:02
    Nikos, Is this a hobby or what you do for a living? Either way, you do awesome work.
  • NikosGNikosG Posts: 705
    edited 2015-04-22 09:16
    NWCCTV wrote: »
    Nikos, Is this a hobby or what you do for a living? Either way, you do awesome work.

    Thank you Andy,
    I am an ICT teacher, but I prefer to see my job as a hobby!.
    So Parallax and robotics is a great way to show my students the beauty of programming and algorithms.!

    For the next example the only we have to do is to make a copy of the above commands,
    and change the position of "a" and "b" variables in every drive_speed(a,b).
    Then we'll have the next:

    attachment.php?attachmentid=113970&d=1429720147

    I think it could be an "advanced erco's figure 8 challenge".....
    892 x 476 - 104K
  • WhitWhit Posts: 4,191
    edited 2015-04-22 14:19
    erco will love it! Figure Eight challenge times 9!
  • ercoerco Posts: 20,244
    edited 2015-04-24 19:04
    Yes, erco loves it! Awesome job Nikos! Makes me want to try my Trike Bot on a course like that!

    BTW Whit, thank you (very much) in Greek is "Efharisto" (poli). I guess you meant the Greek letters resemble "Eucharist" back in #130?
  • NikosGNikosG Posts: 705
    edited 2015-04-25 06:13
    erco wrote: »
    Yes, erco loves it! Awesome job Nikos! Makes me want to try my Trike Bot on a course like that!
    In real situations I had not a 100% symmetry as the theoretical drawings......
    Maybe because the robot makes first the entire right group of circles, and then the entire left group and not sequential figure 8s

    attachment.php?attachmentid=114000&d=1429966590

    However I had enough accuracy with spirals.....
    erco wrote: »

    thank you (very much) in Greek is "Efharisto" (poli). I guess you meant the Greek letters resemble "Eucharist" back in #130?

    ... Not only the letters resemble "Eucharist". The meaning of the Greek "Ευχαριστώ" can be very similar to "Eucharist". Using the adjective "Θεία"=holy before "Ευχαριστώ" they have exactly the same meaning: "Θεία Ευχαριστία"="Eucharist"! (and the sound is also very similar)
    640 x 480 - 135K
  • NikosGNikosG Posts: 705
    edited 2015-04-25 08:34
    The "Artist" draws spirals using the chalk and simultaneously plays the "Asturias" from Isaac Alb
  • ercoerco Posts: 20,244
    edited 2015-04-25 18:29
    That is truly a thing of beauty, Nikos! Music and technology mixed together, simply wonderful. Zorba the Greek bot dancing as it does its work.

    When the robots come to kill us all, I hope they will play some nice music as you have demonstrated. It's the least they can do.

    Great job, Boss!
  • WhitWhit Posts: 4,191
    edited 2015-04-25 19:25
    Just saw the photo of facebook, but the video is incredible! Great work as always friend!

    Your robot is an Artist and so are you.
  • NikosGNikosG Posts: 705
    edited 2015-04-26 04:33
    Whit wrote: »
    Just saw the photo of facebook, but the video is incredible! Great work as always friend!

    Your robot is an Artist and so are you.

    Thank you Whit,
    From a short research about spirals, I found that except from the artistic interest (as drawings), spirals also have an extremely mathematical interest (much more than I initially thought)! Maybe I must spend some more time with them…….. (It would be very interesting because all this theory can be applied to the S2 Robot too!). The spiral I made, is a type of “Archimedean Spiral” but there are many other types of spirals with different mathematic features……..
  • NikosGNikosG Posts: 705
    edited 2015-04-28 11:31
    In order to make an Archimedean Spiral, you must draw sequential semicircles and gradually you must increase the radius in a constant amount.
    So the 1st semicircle has radius r=5, the 2nd r=10, the 3rd r=15, the 4rth r=20, the 5th r=25, the 6th r=30 and son on ….
    So we must calculate the appropriate “a”, “b” parameters for the Drive_speed(a,b) commands, according the formula from post#128. We must also calculate the time for the “pause” command in order to achieve a semicircle, taking into account that every semicircle is an arc with 180 degrees angle. So using the formula from post#129. we have :

    attachment.php?attachmentid=114020&d=1430245308

    For the double spiral in order to draw the 2nd spiral we write down the same commands as the 1rst spiral but reversely,
    and we also change the order between “a” and “b” inside the drive_speed(a,b) commands…

    attachment.php?attachmentid=114021&d=1430245673

    A special interest has the " Fibonacci or Golden spiral"....
    907 x 770 - 170K
    864 x 926 - 309K
  • PublisonPublison Posts: 12,366
    edited 2015-04-28 11:55
    Nikos,

    I am always amazed at your mathematical abilities, and the way that it shows the children how they relate to a direct output.

    Excellent work again!

    Jim
  • WhitWhit Posts: 4,191
    edited 2015-04-28 21:00
    You said it Jim! These are great lessons. Thanks again Nikos.
  • ercoerco Posts: 20,244
    edited 2015-04-29 10:50
    Spirals are great. Makes me want to try some on servo-steered trikebot, except tracing the path might be difficult. It weighs so little that simply dragging a marker might throw off the steering/tracking.

    Of course, I've been a sucker for the magic of spirals since I learned about the sun dagger in Chaco Canyon. Jump to 1:00 at https://www.youtube.com/watch?v=sS73UpIy7zs
  • NikosGNikosG Posts: 705
    edited 2015-04-29 12:28
    erco wrote: »
    Spirals are great. Makes me want to try some on servo-steered trikebot, except tracing the path might be difficult. It weighs so little that simply dragging a marker might throw off the steering/tracking.

    Of course, I've been a sucker for the magic of spirals since I learned about the sun dagger in Chaco Canyon. Jump to 1:00 at https://www.youtube.com/watch?v=sS73UpIy7zs
    Spirals are great indeed! It is amazing that people from different places of the planet without internet or any type of communication, thousands years ago (like the Greek Archimedes and Indians from Chaco Canyon) had spirals in the center of their research!
    Another interesting point is that “Fibonacci spiral” is connected also with the number “Phi” (the golden ratio) that is always in nature.

    attachment.php?attachmentid=114032&d=1430335595

    Some people call that number as the “fingerprint of God”.
    In the next posts I’ll try to make a connection between Fibonacci spiral algorithm and Parallax robots
    879 x 713 - 767K
  • NikosGNikosG Posts: 705
    edited 2015-05-01 13:00
    In order to make a “Fibonacci spiral” using a robot you must draw sequential arcs and not semicircles as the Archimedean spiral.
    The radius of each arc must be a number from the Fibonacci sequence 0,1,1,2,3,5,8,13,,21,34,55,89,144,… (We start with 0 and 1 and then each subsequent number is the sum of the previous two). The angle of each arc must be 90 degrees.
    The only we have to do is to calculate the appropriate a, b for drive_speed(a,b) commands, and time for the Pause commands using the formulas from post #128 and post #129....

    attachment.php?attachmentid=114039&d=1430510266
    766 x 1289 - 336K
  • WhitWhit Posts: 4,191
    edited 2015-05-04 14:37
    Inspired by Nikos "Artist," little brother wanted to get in on the fun. Thanks to Phil's S2 Object - it really wasn't that hard. I did end up going counter-clock-wise, but that is easy to change too!

    Bravo and thanks Nikos for the fun idea!

    Spin for the S2 is attached also. Use at will! And have fun!

    Edit: Side by side comparison...

    attachment.php?attachmentid=114060&d=1430775412

    attachment.php?attachmentid=114063&d=1430795589

    attachment.php?attachmentid=114064&d=1430798087
    400 x 300 - 25K
    400 x 251 - 16K
    400 x 300 - 29K
  • ercoerco Posts: 20,244
    edited 2015-05-04 15:33
    Well done Whit! Now you're just shaming me into doing a spiral with my trike. Should be simple, just drive and slowly increment the steering servo, but I'm swamped right now, it will have to wait a few days.

    You guys are having all the fun. Maybe Nikos' spiral challenge is the new figure 8! Certainly a companion challenge.
  • PublisonPublison Posts: 12,366
    edited 2015-05-05 08:16
    That is most impressive Mr. Whit!
  • ercoerco Posts: 20,244
    edited 2015-05-05 11:01
    As I requested elsewhere:

    Which type of spiral shall I attempt?

    Archimedes, Fibonacci, Logarithmic, Parabolic, or Hyperbolic? http://science.jrank.org/.../6396/Spiral-Types-spirals.html
Sign In or Register to comment.