Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AI.js: Robots with Brains

AI.js: Robots with Brains

Take JavaScript robots to the next level - presented at JSConf US 2013

See the demo video: http://youtu.be/JKumEFyOvuI

Raquel Vélez

May 27, 2013
Tweet

More Decks by Raquel Vélez

Other Decks in Technology

Transcript

  1. AI.js:
    Robots with Brains
    One step closer to the robot invasion.
    Brought to you by @rockbot

    View Slide

  2. Warning:
    There may be math.

    View Slide

  3. Warning:
    There will be math.

    View Slide

  4. rockbot & Robots:
    A Brief History

    View Slide

  5. My First Robot

    View Slide

  6. View Slide

  7. My Second Robot

    View Slide

  8. View Slide

  9. A Few Other Robots

    View Slide

  10. View Slide

  11. “T
    raditional” Robotics

    View Slide

  12. Robots come from research
    PhDs do research
    Research costs $$$$
    Robots “need” OOP & Threading
    (i.e. C++, Python)

    View Slide

  13. Robot Domination...?

    View Slide

  14. Robot Domination...?
    Not anytime soon.

    View Slide

  15. NodeBots:
    A New Beginning

    View Slide

  16. Step 1:
    eeeee eeeee eeeee eeee e eeeee
    8 8 8 88 8 8 8 8 8 "
    8e 8 8 8 8e 8 8eee 8e 8eeee
    88 8 8 8 88 8 88 e 88 88
    88 8 8eee8 88ee8 88ee 88 8ee88 8ee88
    eeeee eeee eeeee e eeeee e eeeee eeeee eeeee eeeee
    8 " 8 8 8 8 8 8 8 8 8 8 88 8 8 8
    8eeee 8eee 8eee8e 8e 8eee8 8e 8eee8 8 8 8eee8e 8e
    88 88 88 8 88 88 8 88 88 8 8 88 8 88
    8ee88 88ee 88 8 88 88 8 88eee 88 8eee8 88 8 88
    (node.js serialport)
    @voodootikigod

    View Slide

  17. Step 2:
    (Johnny-Five)
    @rwaldron

    View Slide

  18. Step 3:
    vektor
    @rockbot

    View Slide

  19. Robotics 101:
    Artificial Intelligence

    View Slide

  20. Decisions, Decisions, Decisions
    Obstacle
    Obstacle
    Robot

    View Slide

  21. Robotics 101:
    Serial Manipulators

    View Slide

  22. View Slide

  23. A Serial Manipulator

    View Slide

  24. Forward Kinematics
    Joint
    Angles
    Position
    of
    End Effector

    View Slide

  25. Inverse Kinematics
    Joint
    Angles
    Position
    of
    End Effector

    View Slide

  26. Matrices are Your Friend
    Frame
    Rotation
    Frame
    Position

    View Slide

  27. Matrices are Your Friend

    View Slide

  28. vektor
    Make the computer do the hard stuff

    View Slide

  29. Forward Kinematics with vektor
    var vektor = require('vektor'),
    Homog = vektor.homog,
    Vector = vektor.vector,
    Rotate = vektor.rotate,
    H0, H1, H2, H3, endEff;
    H0 = Homog(Rotate.RotX(0), new Vector([0, 0, 0]));
    H1 = H0.dot( Homog(Rotate.RotZ(angles[0]), 0) );
    H2 = H1.dot( Homog(Rotate.RotZ(angles[1]), new
    Vector([100,0,0])) );
    H3 = H2.dot( Homog(0, new Vector([100,0,0])) );
    endEff = T3.getPoint();

    View Slide

  30. Demo Time!

    View Slide

  31. View Slide

  32. View Slide

  33. Ok, cute.

    View Slide

  34. Ok, cute.
    So what?

    View Slide

  35. Robots v. NodeBots
    Traditional (C++) JavaScript (Node.js)
    Multi-threaded Single-threaded
    Well established Just getting started
    Top tools and funding All our pennies together
    Brilliant People You, me, and all our friends

    View Slide

  36. Robots v. NodeBots
    Traditional (C++) JavaScript (Node.js)
    Research & Papers Open Source
    $$$$$ Open Source
    Compile, Load, Boot, Hope, Pray F5 / ⌘-R
    Get a PhD Get started

    View Slide

  37. Go.

    View Slide

  38. Build a robot.

    View Slide

  39. Then tell me all about it!

    View Slide

  40. Raquel Vélez
    @rockbot
    http://rckbt.me
    [email protected]

    View Slide