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 full-size slide

  2. Warning:
    There may be math.

    View full-size slide

  3. Warning:
    There will be math.

    View full-size slide

  4. rockbot & Robots:
    A Brief History

    View full-size slide

  5. My First Robot

    View full-size slide

  6. My Second Robot

    View full-size slide

  7. A Few Other Robots

    View full-size slide

  8. “T
    raditional” Robotics

    View full-size slide

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

    View full-size slide

  10. Robot Domination...?

    View full-size slide

  11. Robot Domination...?
    Not anytime soon.

    View full-size slide

  12. NodeBots:
    A New Beginning

    View full-size slide

  13. 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 full-size slide

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

    View full-size slide

  15. Step 3:
    vektor
    @rockbot

    View full-size slide

  16. Robotics 101:
    Artificial Intelligence

    View full-size slide

  17. Decisions, Decisions, Decisions
    Obstacle
    Obstacle
    Robot

    View full-size slide

  18. Robotics 101:
    Serial Manipulators

    View full-size slide

  19. A Serial Manipulator

    View full-size slide

  20. Forward Kinematics
    Joint
    Angles
    Position
    of
    End Effector

    View full-size slide

  21. Inverse Kinematics
    Joint
    Angles
    Position
    of
    End Effector

    View full-size slide

  22. Matrices are Your Friend
    Frame
    Rotation
    Frame
    Position

    View full-size slide

  23. Matrices are Your Friend

    View full-size slide

  24. vektor
    Make the computer do the hard stuff

    View full-size slide

  25. 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 full-size slide

  26. Ok, cute.
    So what?

    View full-size slide

  27. 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 full-size slide

  28. 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 full-size slide

  29. Build a robot.

    View full-size slide

  30. Then tell me all about it!

    View full-size slide

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

    View full-size slide